]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
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

6 years agofr_dlist_num_elements should take a const head
Arran Cudbard-Bell [Sun, 24 Nov 2019 05:07:09 +0000 (00:07 -0500)] 
fr_dlist_num_elements should take a const head

6 years agoOnly set num_timer_events if the event is going to execute the next time the service...
Arran Cudbard-Bell [Sun, 24 Nov 2019 05:06:53 +0000 (00:06 -0500)] 
Only set num_timer_events if the event is going to execute the next time the service function is called

6 years agoMore checks for talloc_pooled_object
Arran Cudbard-Bell [Sun, 24 Nov 2019 05:06:28 +0000 (00:06 -0500)] 
More checks for talloc_pooled_object

6 years agoHave event corral take an external time
Arran Cudbard-Bell [Sun, 24 Nov 2019 05:06:15 +0000 (00:06 -0500)] 
Have event corral take an external time

This can be more efficient, and means that was can control time for the purposes of testing

6 years agoAlways indicate when the connection was signalled to reconnect
Arran Cudbard-Bell [Sun, 24 Nov 2019 04:56:02 +0000 (23:56 -0500)] 
Always indicate when the connection was signalled to reconnect

6 years agoImmediately transition connections back to init if there's no reconnection delay
Arran Cudbard-Bell [Sun, 24 Nov 2019 04:54:22 +0000 (23:54 -0500)] 
Immediately transition connections back to init if there's no reconnection delay

6 years agoAdd debug output whenever we call a connection callback
Arran Cudbard-Bell [Sun, 24 Nov 2019 03:41:01 +0000 (22:41 -0500)] 
Add debug output whenever we call a connection callback

6 years agoInitialise lists when the connection is allocated, not when it enters the init state
Arran Cudbard-Bell [Sun, 24 Nov 2019 02:49:42 +0000 (21:49 -0500)] 
Initialise lists when the connection is allocated, not when it enters the init state

6 years agodns_label_length can return 0
Alan T. DeKok [Sat, 23 Nov 2019 20:17:17 +0000 (15:17 -0500)] 
dns_label_length can return 0

6 years agorevert to before changes
Alan T. DeKok [Fri, 22 Nov 2019 16:54:32 +0000 (11:54 -0500)] 
revert to before changes

6 years agorun only one child make
Alan T. DeKok [Fri, 22 Nov 2019 16:16:18 +0000 (11:16 -0500)] 
run only one child make

6 years agotry to quiet make
Alan T. DeKok [Fri, 22 Nov 2019 16:10:45 +0000 (11:10 -0500)] 
try to quiet make

6 years agoensure we build CA before server / ocsp / client certs
Alan T. DeKok [Fri, 22 Nov 2019 15:48:55 +0000 (10:48 -0500)] 
ensure we build CA before server / ocsp / client certs

6 years agoreorder rules for generating passwords.mk
Alan T. DeKok [Fri, 22 Nov 2019 15:48:23 +0000 (10:48 -0500)] 
reorder rules for generating passwords.mk

6 years agoThe dhcpv6 'packet_*.txt' should decode only the hex
Jorge Pereira [Fri, 22 Nov 2019 00:42:57 +0000 (21:42 -0300)] 
The dhcpv6 'packet_*.txt' should decode only the hex

It was updated using the tool scripts/pcap2decode-proto.py

e.g:

./scripts/pcap2decode-proto.py -p dhcpv6 \
-f ../tcpdump.git/tests/dhcpv6-ia-pd.pcap \
> src/tests/unit/protocols/dhcpv6/packet_ia-pd.txt

6 years agoalways define GENERATED_CERT_FILES
Alan T. DeKok [Fri, 22 Nov 2019 15:19:52 +0000 (10:19 -0500)] 
always define GENERATED_CERT_FILES

6 years agoadd rule for "dh", too
Alan T. DeKok [Fri, 22 Nov 2019 14:28:08 +0000 (09:28 -0500)] 
add rule for "dh", too

6 years agobetter rules to create certificates
Alan T. DeKok [Fri, 22 Nov 2019 13:57:59 +0000 (08:57 -0500)] 
better rules to create certificates

so we don't have all certs depending on all cnf files

6 years agocall dhcpv6 encode_value from the struct encoder
Alan T. DeKok [Thu, 21 Nov 2019 20:48:26 +0000 (15:48 -0500)] 
call dhcpv6 encode_value from the struct encoder

which then changes all of the dates in the tests, as DHCPv6
starts dates from Jan 1 2000, instead of Jan 1 1970.

6 years agofix DHCPv6 date encode / decode
Alan T. DeKok [Thu, 21 Nov 2019 19:26:09 +0000 (14:26 -0500)] 
fix DHCPv6 date encode / decode

decode didn't add the date offset from Jan 1 1970 --> Jan 1, 2000.

encode added 30*365*86400, which doesn't account for the fact that
years are ~365.25 days long.

6 years agoallow encoding of time_delta in dhcpv6
Alan T. DeKok [Thu, 21 Nov 2019 19:09:07 +0000 (14:09 -0500)] 
allow encoding of time_delta in dhcpv6

and print out type names for unsupported types

6 years agoreturn correct lengths for time delta / date attributes
Alan T. DeKok [Thu, 21 Nov 2019 19:07:52 +0000 (14:07 -0500)] 
return correct lengths for time delta / date attributes

6 years agocopy over key fields, too
Alan T. DeKok [Thu, 21 Nov 2019 18:54:35 +0000 (13:54 -0500)] 
copy over key fields, too

6 years agoremove extraneous check
Alan T. DeKok [Thu, 21 Nov 2019 13:39:36 +0000 (08:39 -0500)] 
remove extraneous check

6 years agoIncrease the 'nasportid' SQL field for 'varchar(32)'. ref #3141
Jorge Pereira [Tue, 19 Nov 2019 22:01:47 +0000 (19:01 -0300)] 
Increase the 'nasportid' SQL field for 'varchar(32)'. ref #3141

6 years agoalways call protocol-specific decode_value, if we have it
Alan T. DeKok [Thu, 21 Nov 2019 13:31:24 +0000 (08:31 -0500)] 
always call protocol-specific decode_value, if we have it

6 years agoPrint the test module dir and the test file (#3153)
Jorge Pereira [Wed, 20 Nov 2019 22:44:59 +0000 (19:44 -0300)] 
Print the test module dir and the test file (#3153)

It will print like:

UNIT-TEST dhcpv6 rfc6939

Instead of:

UNIT-TEST src/tests/unit/protocols/dhcpv6/rfc6939.txt