]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agoWe only need to update trunk I/O events on connection state changes if the connection...
Arran Cudbard-Bell [Sat, 7 Dec 2019 06:10:25 +0000 (13:10 +0700)] 
We only need to update trunk I/O events on connection state changes if the connection was just closed

We'll add I/O events back if new requests are enqueued

6 years agoCall cancel_mux if there's partial cancellations too
Arran Cudbard-Bell [Sat, 7 Dec 2019 05:35:13 +0000 (12:35 +0700)] 
Call cancel_mux if there's partial cancellations too

6 years agoOnly enforce max_connections if its above zero
Arran Cudbard-Bell [Fri, 6 Dec 2019 23:30:21 +0000 (06:30 +0700)] 
Only enforce max_connections if its above zero

6 years agoStart off assuming we're probably above our target number of connections
Arran Cudbard-Bell [Fri, 6 Dec 2019 23:29:59 +0000 (06:29 +0700)] 
Start off assuming we're probably above our target number of connections

6 years agos/waited/elapsed
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:49:25 +0000 (18:49 +0700)] 
s/waited/elapsed

6 years agoDoxygen
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:47:36 +0000 (18:47 +0700)] 
Doxygen

6 years agoCancel sent can be entered from cancel_partial
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:47:17 +0000 (18:47 +0700)] 
Cancel sent can be entered from cancel_partial

6 years agoExpose interface to requeue requests
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:46:40 +0000 (18:46 +0700)] 
Expose interface to requeue requests

6 years agoCall the cancel callback after the request has changed state
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:45:31 +0000 (18:45 +0700)] 
Call the cancel callback after the request has changed state

6 years agoRecalculate requests per connection when a request enters the backlog
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:45:05 +0000 (18:45 +0700)] 
Recalculate requests per connection when a request enters the backlog

6 years agoFormatting
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:44:45 +0000 (18:44 +0700)] 
Formatting

6 years agoAssert if the connection is not in the correct state when CONN_REORDER is called
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:41:27 +0000 (18:41 +0700)] 
Assert if the connection is not in the correct state when CONN_REORDER is called

Skip reordering if we only have one connection

6 years agoPrint connection numbers in debug output
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:41:09 +0000 (18:41 +0700)] 
Print connection numbers in debug output

6 years agoRename request/connection counting functions to have consistent names
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:40:27 +0000 (18:40 +0700)] 
Rename request/connection counting functions to have consistent names

Allow immediate spawning of connections

6 years agoUnused fields
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:36:12 +0000 (18:36 +0700)] 
Unused fields

6 years agoMove tests into a separate file
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:35:56 +0000 (18:35 +0700)] 
Move tests into a separate file

6 years agosend packets on reply only if we missed packets
Alan T. DeKok [Fri, 6 Dec 2019 19:10:02 +0000 (14:10 -0500)] 
send packets on reply only if we missed packets

and don't send any packets if we're gated.

This keeps the backlog correct.  But it still sends at a rate
higher than the requested PPS.  It's not yet clear why that's happening

6 years agoskip timer if we are not getting a response
Alan T. DeKok [Fri, 6 Dec 2019 17:37:27 +0000 (12:37 -0500)] 
skip timer if we are not getting a response

6 years agocorrect output stats
Alan T. DeKok [Fri, 6 Dec 2019 17:36:23 +0000 (12:36 -0500)] 
correct output stats

6 years agoalways run the timer at expected intervals
Alan T. DeKok [Fri, 6 Dec 2019 17:24:05 +0000 (12:24 -0500)] 
always run the timer at expected intervals

6 years agomanual merge from v3.0.x
Alan T. DeKok [Fri, 6 Dec 2019 14:17:24 +0000 (09:17 -0500)] 
manual merge from v3.0.x

6 years agofix error messages
Alan T. DeKok [Fri, 6 Dec 2019 13:51:11 +0000 (08:51 -0500)] 
fix error messages

6 years agoFix rlm_python build with Python 3.6.x
Jorge Pereira [Fri, 6 Dec 2019 00:19:25 +0000 (21:19 -0300)] 
Fix rlm_python build with Python 3.6.x

We don't need '-Wl,-stack_size,1000000'

6 years agoAdd more debug info when tracing connectoin.c function calls
Arran Cudbard-Bell [Fri, 6 Dec 2019 03:39:29 +0000 (10:39 +0700)] 
Add more debug info when tracing connectoin.c function calls

6 years agoRename FULL to INACTIVE
Arran Cudbard-Bell [Fri, 6 Dec 2019 03:37:47 +0000 (10:37 +0700)] 
Rename FULL to INACTIVE

It's essentially the same state.  The connection should not have any new requests queued up, but is free to continue processing existing ones.

We should probably add a public API function to shift requests off a particular connection too.

6 years agonotes for TLVs
Alan T. DeKok [Thu, 5 Dec 2019 22:13:57 +0000 (17:13 -0500)] 
notes for TLVs

6 years agotypo
Matthew Newton [Thu, 5 Dec 2019 19:43:27 +0000 (19:43 +0000)] 
typo

vim being "helpful"...

6 years agorpm spec: include mssql files
Matthew Newton [Thu, 5 Dec 2019 19:08:50 +0000 (19:08 +0000)] 
rpm spec: include mssql files

6 years agoshut up C compiler
Alan T. DeKok [Thu, 5 Dec 2019 17:14:36 +0000 (12:14 -0500)] 
shut up C compiler

6 years agoallow encoding and decoding of structs with 16-bit length prefixes.
Alan T. DeKok [Thu, 5 Dec 2019 16:22:33 +0000 (11:22 -0500)] 
allow encoding and decoding of structs with 16-bit length prefixes.

6 years agonow that events are linked, we don't need to free it.
Alan T. DeKok [Thu, 5 Dec 2019 14:51:59 +0000 (09:51 -0500)] 
now that events are linked, we don't need to free it.

6 years agomove printing to load generator function
Alan T. DeKok [Thu, 5 Dec 2019 14:48:38 +0000 (09:48 -0500)] 
move printing to load generator function

which lets us change the stats without changing all users
of the load generator

6 years agoCall notify update when requests enter the cancelled state and we have a cancel muxer...
Arran Cudbard-Bell [Thu, 5 Dec 2019 15:04:16 +0000 (22:04 +0700)] 
Call notify update when requests enter the cancelled state and we have a cancel muxer, and again when the request enters with cancel sent state

6 years agorlm_sql_unixodbc: Use descriptor corresponding to the resultset not the source
Terry Burton [Wed, 4 Dec 2019 19:31:38 +0000 (19:31 +0000)] 
rlm_sql_unixodbc: Use descriptor corresponding to the resultset not the source

Fixes #2822

6 years agorlm_sql_unixodbc: Some drivers do not write to all bytes of the value
Terry Burton [Wed, 4 Dec 2019 19:30:54 +0000 (19:30 +0000)] 
rlm_sql_unixodbc: Some drivers do not write to all bytes of the value

6 years agoAdd many more tests
Arran Cudbard-Bell [Thu, 5 Dec 2019 11:57:23 +0000 (18:57 +0700)] 
Add many more tests

Add cancel partial state for dealing with partial writes when cancelling

Restore in_handler correctly when doing nested handler calls.  We *may* need to move this to a stack, but lets not do that unless we have to.

When requing requests, free the cancelled ones, don't try and move them to a new connection *sigh*

6 years agoNotify function does not return a void *
Arran Cudbard-Bell [Thu, 5 Dec 2019 11:56:28 +0000 (18:56 +0700)] 
Notify function does not return a void *

6 years agoshouldn't have been comitted...
Arran Cudbard-Bell [Thu, 5 Dec 2019 04:39:39 +0000 (11:39 +0700)] 
shouldn't have been comitted...

6 years agoAdd callback to update the event loop for when the trunk wants to be notified that...
Arran Cudbard-Bell [Thu, 5 Dec 2019 03:48:18 +0000 (10:48 +0700)] 
Add callback to update the event loop for when the trunk wants to be notified that a connection is readable or writable

6 years agodon't link a context to itself.
Alan T. DeKok [Wed, 4 Dec 2019 15:32:12 +0000 (10:32 -0500)] 
don't link a context to itself.

and don't allow linking to a NULL context.  It doesn't make sense.

6 years agodon't dereference a NULL pointer.
Alan T. DeKok [Wed, 4 Dec 2019 15:18:07 +0000 (10:18 -0500)] 
don't dereference a NULL pointer.

And it's stupid to call fr_event_list_time() with a NULL pointer.

6 years agoadd documentation for load testing
Alan T. DeKok [Wed, 4 Dec 2019 15:11:07 +0000 (10:11 -0500)] 
add documentation for load testing

6 years agotrack and print accepted PPS
Alan T. DeKok [Wed, 4 Dec 2019 14:51:26 +0000 (09:51 -0500)] 
track and print accepted PPS

6 years agostop printing stats if the test is over
Alan T. DeKok [Wed, 4 Dec 2019 14:50:51 +0000 (09:50 -0500)] 
stop printing stats if the test is over

6 years agoremove "inline".
Alan T. DeKok [Wed, 4 Dec 2019 14:24:59 +0000 (09:24 -0500)] 
remove "inline".

The compiler is complaining that it's use is incorrect. And,
the compiler is smart enough to do inlining anyways.  "inline"
is a hint, and can be ignored by the compiler for non-trivial
functions.:

6 years agoImplement SQL IP pools for SQLite
Terry Burton [Wed, 4 Dec 2019 13:08:03 +0000 (13:08 +0000)] 
Implement SQL IP pools for SQLite

6 years agoAdd basic enqueue test
Arran Cudbard-Bell [Wed, 4 Dec 2019 12:16:40 +0000 (19:16 +0700)] 
Add basic enqueue test

6 years agoAdd trunk request ID
Arran Cudbard-Bell [Wed, 4 Dec 2019 12:02:53 +0000 (19:02 +0700)] 
Add trunk request ID

6 years agoChange connection log format to help keep is consistent between the trunk and connection
Arran Cudbard-Bell [Wed, 4 Dec 2019 12:02:07 +0000 (19:02 +0700)] 
Change connection log format to help keep is consistent between the trunk and connection

6 years agoFix issue where post handlers were inserted as pre handlers
Arran Cudbard-Bell [Wed, 4 Dec 2019 07:45:34 +0000 (14:45 +0700)] 
Fix issue where post handlers were inserted as pre handlers

Only call post handlers if the transition succeeded.

6 years agoExpose the connection ID
Arran Cudbard-Bell [Wed, 4 Dec 2019 07:44:48 +0000 (14:44 +0700)] 
Expose the connection ID

6 years agoAllow overriding of the time source for event loops
Arran Cudbard-Bell [Wed, 4 Dec 2019 07:06:54 +0000 (14:06 +0700)] 
Allow overriding of the time source for event loops

6 years agoRe-add the context linkage between the FD events and the provided talloc context
Arran Cudbard-Bell [Wed, 4 Dec 2019 07:04:11 +0000 (14:04 +0700)] 
Re-add the context linkage between the FD events and the provided talloc context

Not sure if this was removed or just an omission?

6 years agoRevert "Add the ability to add timers relative to el->now"
Arran Cudbard-Bell [Wed, 4 Dec 2019 00:49:00 +0000 (07:49 +0700)] 
Revert "Add the ability to add timers relative to el->now"

This reverts commit d60355fc4b9ad8163f9637d9b23f1247edee6894.

6 years agomanual merge of commit f04091f61
Alan T. DeKok [Wed, 4 Dec 2019 00:34:42 +0000 (19:34 -0500)] 
manual merge of commit f04091f61

6 years agomove ema to backlog_ema
Alan T. DeKok [Tue, 3 Dec 2019 14:44:31 +0000 (09:44 -0500)] 
move ema to backlog_ema

in preparation for adding pps_ema

6 years agoOSX is different from Linux
Alan T. DeKok [Mon, 2 Dec 2019 16:19:22 +0000 (11:19 -0500)] 
OSX is different from Linux

We shouldn't say "debugger attached" if there's no debugger
attached.

6 years agoTrunk API
Arran Cudbard-Bell [Wed, 27 Nov 2019 00:24:53 +0000 (19:24 -0500)] 
Trunk API

6 years agoAdd extra tests for xlat related to #3169
Jorge Pereira [Tue, 3 Dec 2019 15:52:51 +0000 (12:52 -0300)] 
Add extra tests for xlat related to #3169

It will help us to avoid the crash again.

6 years agoImport .pcap RADIUS tests from wireshark project
Jorge Pereira [Tue, 26 Nov 2019 20:14:41 +0000 (17:14 -0300)] 
Import .pcap RADIUS tests from wireshark project

Copied from https://wiki.wireshark.org/SampleCaptures and converted
with:

./scripts/pcap2decode-proto.py -p radius -f ~/radius_localhost.pcapng \
> src/tests/unit/protocols/radius/packet_wireshark01.txt

6 years agoFix mod_event_list_set() to stop if failed to open()
Jorge Pereira [Tue, 3 Dec 2019 00:50:15 +0000 (21:50 -0300)] 
Fix mod_event_list_set() to stop if failed to open()

If failed to open() the file, just report and stop it.

6 years agoFix leak in xlat_tokenize_attribute() (#3172)
Jorge Pereira [Mon, 2 Dec 2019 21:14:45 +0000 (18:14 -0300)] 
Fix leak in xlat_tokenize_attribute() (#3172)

6 years agonew vendor support (#3168)
towingie [Mon, 2 Dec 2019 20:57:14 +0000 (23:57 +0300)] 
new vendor support (#3168)

* - added dictionary for rcntec's RPCM hardware

* - added missing `$INCLUDE dictionary.rcntec` include into `share/dictionary/radius/dictionary`

* - added session expire parameter

* - updated RCNTEC-RPCM-Session-Expire attribute number, was incorrect

6 years agoFix leak in xlat_tokenize_literal() (#3171)
Jorge Pereira [Mon, 2 Dec 2019 20:27:55 +0000 (17:27 -0300)] 
Fix leak in xlat_tokenize_literal() (#3171)

6 years agoInternal functions aren't attributes. Fixes #3169
Alan T. DeKok [Mon, 2 Dec 2019 14:25:02 +0000 (09:25 -0500)] 
Internal functions aren't attributes.  Fixes #3169

6 years agodon't use "new" as a variable name
Alan T. DeKok [Mon, 2 Dec 2019 14:09:20 +0000 (09:09 -0500)] 
don't use "new" as a variable name

lldb doesn't like it.

6 years agoadd missing definition
Alan T. DeKok [Mon, 2 Dec 2019 14:00:33 +0000 (09:00 -0500)] 
add missing definition

6 years agoallow $INCLUDE dir/ to happen twice
Alan T. DeKok [Mon, 2 Dec 2019 13:46:26 +0000 (08:46 -0500)] 
allow $INCLUDE dir/ to happen twice

which means include all of the files twice

6 years agoremove wrong struct member
Alan T. DeKok [Sun, 1 Dec 2019 16:23:14 +0000 (11:23 -0500)] 
remove wrong struct member

6 years agocomplain if write fails
Alan T. DeKok [Sun, 1 Dec 2019 14:24:57 +0000 (09:24 -0500)] 
complain if write fails

but there isn't much else we can do

6 years agominor cleanups and add link to audit tool
Alan T. DeKok [Sun, 1 Dec 2019 14:10:52 +0000 (09:10 -0500)] 
minor cleanups and add link to audit tool

6 years agoset actual start time
Alan T. DeKok [Sun, 1 Dec 2019 13:42:26 +0000 (08:42 -0500)] 
set actual start time

6 years agowrite stats to a CSV file once every second
Alan T. DeKok [Sun, 1 Dec 2019 01:14:32 +0000 (20:14 -0500)] 
write stats to a CSV file once every second

6 years agobetter track "send net packet time"
Alan T. DeKok [Sun, 1 Dec 2019 01:13:32 +0000 (20:13 -0500)] 
better track "send net packet time"

so it doesn't vary.

6 years agotrack step end in absolute nanoseconds
Alan T. DeKok [Sun, 1 Dec 2019 00:39:23 +0000 (19:39 -0500)] 
track step end in absolute nanoseconds

6 years agoset "last_send" so that we can properly calculate deltas
Alan T. DeKok [Sat, 30 Nov 2019 23:14:36 +0000 (18:14 -0500)] 
set "last_send" so that we can properly calculate deltas

6 years agoalways set last_send packet
Alan T. DeKok [Fri, 29 Nov 2019 21:26:04 +0000 (16:26 -0500)] 
always set last_send packet

6 years agotypos
Alan T. DeKok [Fri, 29 Nov 2019 21:16:05 +0000 (16:16 -0500)] 
typos

6 years agoFix missing fclose()
Jorge Pereira [Fri, 29 Nov 2019 19:15:45 +0000 (16:15 -0300)] 
Fix missing fclose()

6 years agostart of RADIUS load generation routines.
Alan T. DeKok [Fri, 29 Nov 2019 18:46:04 +0000 (13:46 -0500)] 
start of RADIUS load generation routines.

Tested with simple tests.  Seems to work.

Still have to add printing of the statistics.

6 years agoadd load generation routines
Alan T. DeKok [Fri, 29 Nov 2019 18:23:49 +0000 (13:23 -0500)] 
add load generation routines

6 years agocall app_io->event_list_set() if one exists
Alan T. DeKok [Fri, 29 Nov 2019 17:22:10 +0000 (12:22 -0500)] 
call app_io->event_list_set() if one exists

6 years agouse correct source list for transition
Alan T. DeKok [Fri, 29 Nov 2019 16:59:45 +0000 (11:59 -0500)] 
use correct source list for transition

6 years agoSQL IP Pools support for MS SQL
Terry Burton [Wed, 27 Nov 2019 16:00:49 +0000 (16:00 +0000)] 
SQL IP Pools support for MS SQL

Tested using the FreeTDS driver against SQL Server 2017 on Linux Docker, mostly
focussing on the stored procedure which gives 350 allocs/sec; 425 reallocs/sec
(with no specific database server optimisation).

The queries are more complicated than with most other dialects since MS SQL
lacks a "SELECT FOR UPDATE" statement, and its table hints do not provide a
direct means to implement the row-level read lock needed to guarentee that
concurrent queries do not select the same Framed-IP-Address for allocation to
distinct users.

6 years agoMS SQL schema: Syntax fixes and reorganise
Terry Burton [Wed, 27 Nov 2019 16:11:24 +0000 (16:11 +0000)] 
MS SQL schema: Syntax fixes and reorganise

Rework this dump so that it is suitable for humans _and_ computers.

6 years agoUpdate description for rfc5176 payload test
Jorge Pereira [Wed, 27 Nov 2019 16:45:19 +0000 (13:45 -0300)] 
Update description for rfc5176 payload test

6 years agoRename timer callback to be consistent
Arran Cudbard-Bell [Tue, 26 Nov 2019 18:08:34 +0000 (13:08 -0500)] 
Rename timer callback to be consistent

6 years agoAdd iterator for heaps
Arran Cudbard-Bell [Tue, 26 Nov 2019 18:08:16 +0000 (13:08 -0500)] 
Add iterator for heaps

6 years agoQuiet compiler warnings
Arran Cudbard-Bell [Tue, 26 Nov 2019 18:07:32 +0000 (13:07 -0500)] 
Quiet compiler warnings

6 years agoDon't need to append '_radius' to the test files (#3160)
Jorge Pereira [Tue, 26 Nov 2019 17:25:16 +0000 (14:25 -0300)] 
Don't need to append '_radius' to the test files (#3160)

6 years agoImport .pcap RADIUS tests from tcpdump project
Jorge Pereira [Mon, 25 Nov 2019 22:49:36 +0000 (19:49 -0300)] 
Import .pcap RADIUS tests from tcpdump project

It was imported using scripts/pcap2decode-proto.py

e.g:

./scripts/pcap2decode-proto.py -p radius \
-f ../tcpdump.git/tests/RADIUS-RFC4675.pcap \
> src/tests/unit/protocols/radius/packet_radius-rfc4675.txt

6 years agoAdd script to convert .pcap payload to '{decode,encode}-proto' format
Jorge Pereira [Wed, 20 Nov 2019 21:24:08 +0000 (18:24 -0300)] 
Add script to convert .pcap payload to '{decode,encode}-proto' format

It was created to help us to create the dhcpv6 unit tests based on
the tcpdump .pcap files.

6 years agoUpdate dhcpv6 tests with payload description
Jorge Pereira [Mon, 25 Nov 2019 22:25:04 +0000 (19:25 -0300)] 
Update dhcpv6 tests with payload description

6 years agoAdd the ability to add timers relative to el->now
Arran Cudbard-Bell [Mon, 25 Nov 2019 01:29:05 +0000 (20:29 -0500)] 
Add the ability to add timers relative to el->now

Add "CLOSED" state in connection API to avoid transitioning through failed for connections which haven't

6 years agoFix condition in fr_event_corral
Arran Cudbard-Bell [Sun, 24 Nov 2019 19:03:32 +0000 (14:03 -0500)] 
Fix condition in fr_event_corral

6 years agoDon't update el->now in the service function
Arran Cudbard-Bell [Sun, 24 Nov 2019 19:02:28 +0000 (14:02 -0500)] 
Don't update el->now in the service function

We only want the set of events identified by event_corral

6 years agoFormatting
Arran Cudbard-Bell [Sun, 24 Nov 2019 18:57:38 +0000 (13:57 -0500)] 
Formatting

6 years agoAlways return +1 pending event if there's a timer ready
Arran Cudbard-Bell [Sun, 24 Nov 2019 18:57:30 +0000 (13:57 -0500)] 
Always return +1 pending event if there's a timer ready

6 years agoMore debug messages from the interpretor
Arran Cudbard-Bell [Sun, 24 Nov 2019 18:57:14 +0000 (13:57 -0500)] 
More debug messages from the interpretor

6 years agoFix list count decrement on fr_dlist_remove
Arran Cudbard-Bell [Sun, 24 Nov 2019 05:33:17 +0000 (00:33 -0500)] 
Fix list count decrement on fr_dlist_remove