]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agoAdd missing 'decode-pair' for rfc6355 tests (#3121)
Jorge Pereira [Wed, 13 Nov 2019 18:28:58 +0000 (15:28 -0300)] 
Add missing 'decode-pair' for rfc6355 tests (#3121)

6 years agotypo
Alan T. DeKok [Wed, 13 Nov 2019 16:41:44 +0000 (11:41 -0500)] 
typo

6 years agomove dhcp validation to dhcp code.
Alan T. DeKok [Wed, 13 Nov 2019 15:40:22 +0000 (10:40 -0500)] 
move dhcp validation to dhcp code.

and extend validation

6 years agoclarify messages
Alan T. DeKok [Wed, 13 Nov 2019 15:36:51 +0000 (10:36 -0500)] 
clarify messages

6 years agoit's a UDP message, not necessarily a DHCP one
Alan T. DeKok [Wed, 13 Nov 2019 15:30:48 +0000 (10:30 -0500)] 
it's a UDP message, not necessarily a DHCP one

6 years agoUpdate unit tests for rfc6355
Jorge Pereira [Wed, 13 Nov 2019 00:56:13 +0000 (21:56 -0300)] 
Update unit tests for rfc6355

Add tests for the Server-ID-DUID attribute

6 years agoAdd tests for DHCPv6 / rfc4704
Jorge Pereira [Tue, 12 Nov 2019 20:44:34 +0000 (17:44 -0300)] 
Add tests for DHCPv6 / rfc4704

6 years agoadd attr_valid callback to dictionaries
Alan T. DeKok [Wed, 13 Nov 2019 14:06:43 +0000 (09:06 -0500)] 
add attr_valid callback to dictionaries

and move callbacks to RADIUS

6 years agomake the tests actually run
Alan T. DeKok [Wed, 13 Nov 2019 14:06:24 +0000 (09:06 -0500)] 
make the tests actually run

6 years agouse protocol agnostic checks
Alan T. DeKok [Wed, 13 Nov 2019 14:04:06 +0000 (09:04 -0500)] 
use protocol agnostic checks

6 years agotransaction ID is now octets
Alan T. DeKok [Wed, 13 Nov 2019 13:55:30 +0000 (08:55 -0500)] 
transaction ID is now octets

6 years agomake transaction id octets
Alan T. DeKok [Wed, 13 Nov 2019 12:55:48 +0000 (07:55 -0500)] 
make transaction id octets

seeing as it's a 24-bit random value, it's easier to treat it as
octets then as a large decimal number

6 years agoencode_struct() already skips ahead
Alan T. DeKok [Tue, 12 Nov 2019 23:59:02 +0000 (18:59 -0500)] 
encode_struct() already skips ahead

so we don't need to do it here in encode_value()

6 years agonotes on OIDs for EAP over LAN / WAN. From RFC 4334
Alan T. DeKok [Tue, 12 Nov 2019 20:18:32 +0000 (15:18 -0500)] 
notes on OIDs for EAP over LAN / WAN.  From RFC 4334

6 years agotypo
Alan T. DeKok [Tue, 12 Nov 2019 20:10:16 +0000 (15:10 -0500)] 
typo

6 years agoAfter too many years of effort, magic occurs.
Alan T. DeKok [Tue, 12 Nov 2019 19:43:12 +0000 (14:43 -0500)] 
After too many years of effort, magic occurs.

6 years agorearrange fill routine
Alan T. DeKok [Tue, 12 Nov 2019 19:31:15 +0000 (14:31 -0500)] 
rearrange fill routine

in prepation for allowing it to be called from multiple places

6 years agomove if / elsif / map magic to callback functions
Alan T. DeKok [Tue, 12 Nov 2019 19:19:05 +0000 (14:19 -0500)] 
move if / elsif / map magic to callback functions

in preparation for dynamically setting them

6 years agomore docs
Alan T. DeKok [Tue, 12 Nov 2019 19:17:05 +0000 (14:17 -0500)] 
more docs

6 years agorearrange to check for key words before "end of work"
Alan T. DeKok [Tue, 12 Nov 2019 19:02:44 +0000 (14:02 -0500)] 
rearrange to check for key words before "end of work"

and change "map" to not get excited over '{'

6 years agoremove one more goto
Alan T. DeKok [Mon, 11 Nov 2019 20:35:44 +0000 (15:35 -0500)] 
remove one more goto

6 years agomore rearrangement to make the code simpler
Alan T. DeKok [Mon, 11 Nov 2019 20:25:53 +0000 (15:25 -0500)] 
more rearrangement to make the code simpler

6 years agomove stack cleanup to cf_stack_cleanup()
Alan T. DeKok [Mon, 11 Nov 2019 20:16:05 +0000 (15:16 -0500)] 
move stack cleanup to cf_stack_cleanup()

which removes a bunch of "goto error" in cf_file_include()

6 years agomore cleanups
Alan T. DeKok [Mon, 11 Nov 2019 20:09:01 +0000 (15:09 -0500)] 
more cleanups

move complex functionality to separate functions.
in preparation for even more cleanups

6 years agouse the correct OID
Alan T. DeKok [Mon, 11 Nov 2019 19:25:43 +0000 (14:25 -0500)] 
use the correct OID

6 years agoremove unused variable
Alan T. DeKok [Mon, 11 Nov 2019 17:34:11 +0000 (12:34 -0500)] 
remove unused variable

6 years agoAllow verbosity only where is important (#3114)
Jorge Pereira [Mon, 11 Nov 2019 17:33:03 +0000 (14:33 -0300)] 
Allow verbosity only where is important (#3114)

6 years agocheck before dereferencing
Alan T. DeKok [Mon, 11 Nov 2019 17:06:51 +0000 (12:06 -0500)] 
check before dereferencing

6 years agouse correct variable in loop
Alan T. DeKok [Mon, 11 Nov 2019 17:04:57 +0000 (12:04 -0500)] 
use correct variable in loop

6 years agomove assert to before check
Alan T. DeKok [Mon, 11 Nov 2019 17:01:44 +0000 (12:01 -0500)] 
move assert to before check

6 years agoinitialize array
Alan T. DeKok [Mon, 11 Nov 2019 17:00:44 +0000 (12:00 -0500)] 
initialize array

6 years agowe're doing parsing, and don't care about the values
Alan T. DeKok [Mon, 11 Nov 2019 16:59:31 +0000 (11:59 -0500)] 
we're doing parsing, and don't care about the values

6 years agorearrange condition checks
Alan T. DeKok [Mon, 11 Nov 2019 16:57:51 +0000 (11:57 -0500)] 
rearrange condition checks

6 years agoswap order of checks.
Alan T. DeKok [Mon, 11 Nov 2019 16:52:54 +0000 (11:52 -0500)] 
swap order of checks.

6 years agocleanups and removing unused assignments
Alan T. DeKok [Mon, 11 Nov 2019 16:47:28 +0000 (11:47 -0500)] 
cleanups and removing unused assignments

6 years agomake process_template() take stack
Alan T. DeKok [Mon, 11 Nov 2019 16:33:47 +0000 (11:33 -0500)] 
make process_template() take stack

6 years agomake process_if() take stack pointer
Alan T. DeKok [Mon, 11 Nov 2019 16:28:57 +0000 (11:28 -0500)] 
make process_if() take stack pointer

6 years agomake process_map() use the stack instead of arbitrary arguments
Alan T. DeKok [Mon, 11 Nov 2019 16:23:46 +0000 (11:23 -0500)] 
make process_map() use the stack instead of arbitrary arguments

6 years agorestructure code
Alan T. DeKok [Mon, 11 Nov 2019 16:18:10 +0000 (11:18 -0500)] 
restructure code

so that the parser is now in it's own function.  Next steps are to
split the parsing further into pieces

6 years agorearrange code in preparation for parser updates
Alan T. DeKok [Mon, 11 Nov 2019 13:52:36 +0000 (08:52 -0500)] 
rearrange code in preparation for parser updates

6 years agoadd error messages to dhcpv6_verify()
Alan T. DeKok [Mon, 11 Nov 2019 13:26:53 +0000 (08:26 -0500)] 
add error messages to dhcpv6_verify()

6 years agocorrect syntax of NAIRealm.
Alan T. DeKok [Sun, 10 Nov 2019 22:50:17 +0000 (17:50 -0500)] 
correct syntax of NAIRealm.

OpenSSL is "interesting"

6 years agowe don't have a real encoder / decoder for ethernet
Alan T. DeKok [Sun, 10 Nov 2019 22:19:49 +0000 (17:19 -0500)] 
we don't have a real encoder / decoder for ethernet

the entire API has changed, as the old one didn't really work.
So until we redo the ethernet test points, we'll just comment them out

6 years agoadd example of RFC 7585 NAIRealm
Alan T. DeKok [Sun, 10 Nov 2019 22:16:44 +0000 (17:16 -0500)] 
add example of RFC 7585 NAIRealm

6 years agoadd encoder and test cases
Alan T. DeKok [Sun, 10 Nov 2019 21:29:44 +0000 (16:29 -0500)] 
add encoder and test cases

6 years agominor cleanups
Alan T. DeKok [Sun, 10 Nov 2019 21:29:24 +0000 (16:29 -0500)] 
minor cleanups

6 years agofixed encoder / decoder
Alan T. DeKok [Sun, 10 Nov 2019 21:28:36 +0000 (16:28 -0500)] 
fixed encoder / decoder

- packet type is uint32 internally, but is only 1 byte in
  the packet

- encoder stops when it runs out of VPs to encode

6 years agonotes on ASAN and LSAN
Alan T. DeKok [Sat, 9 Nov 2019 20:44:44 +0000 (15:44 -0500)] 
notes on ASAN and LSAN

6 years agowrapper script for fuzzing the server
Alan T. DeKok [Sat, 9 Nov 2019 20:43:44 +0000 (15:43 -0500)] 
wrapper script for fuzzing the server

6 years agocall pair_list_free on error. Closes #3113
Alan T. DeKok [Sat, 9 Nov 2019 19:50:15 +0000 (14:50 -0500)] 
call pair_list_free on error.  Closes #3113

6 years agowe need a tmp_ctx
Alan T. DeKok [Sat, 9 Nov 2019 17:40:10 +0000 (12:40 -0500)] 
we need a tmp_ctx

accidentally deleted in earlier commits

6 years agoadd command_decode_proto
Alan T. DeKok [Sat, 9 Nov 2019 16:35:49 +0000 (11:35 -0500)] 
add command_decode_proto

6 years agodecoder now adds packet type and auth vector to output VPs
Alan T. DeKok [Sat, 9 Nov 2019 16:35:22 +0000 (11:35 -0500)] 
decoder now adds packet type and auth vector to output VPs

6 years agochange test point decode proto function signature
Alan T. DeKok [Sat, 9 Nov 2019 14:30:37 +0000 (09:30 -0500)] 
change test point decode proto function signature

to return the VPs which were decoded

6 years agorename "tp_encode" to "tp_encode_pair"
Alan T. DeKok [Sat, 9 Nov 2019 14:08:34 +0000 (09:08 -0500)] 
rename "tp_encode" to "tp_encode_pair"

in preparation for adding encode/decode of protos

6 years agominor cleanups
Alan T. DeKok [Sat, 9 Nov 2019 01:17:18 +0000 (20:17 -0500)] 
minor cleanups

6 years agoadd ASCII art with packet format
Alan T. DeKok [Sat, 9 Nov 2019 01:14:51 +0000 (20:14 -0500)] 
add ASCII art with packet format

6 years agoadd fr_dhcpv6_encode()
Alan T. DeKok [Sat, 9 Nov 2019 01:13:31 +0000 (20:13 -0500)] 
add fr_dhcpv6_encode()

6 years agoAllow more verbose (#3107)
Jorge Pereira [Thu, 7 Nov 2019 21:18:40 +0000 (18:18 -0300)] 
Allow more verbose (#3107)

perl -p -i -e 's/\t\@/\t\${Q}/' $(find . -name "all.mk" -print)

6 years agoUpdate the global pool here
Jorge Pereira [Thu, 7 Nov 2019 19:29:25 +0000 (16:29 -0300)] 
Update the global pool here

Completing the commit 51ac6d9cd9fa1b3e15bca4aaa22834e5d44a7972

6 years agomove EAP-AKA-SIM magic to the protocol library
Alan T. DeKok [Thu, 7 Nov 2019 20:08:13 +0000 (15:08 -0500)] 
move EAP-AKA-SIM magic to the protocol library

6 years agomove dhcpv6 magic to dhcpv6 library
Alan T. DeKok [Thu, 7 Nov 2019 20:04:24 +0000 (15:04 -0500)] 
move dhcpv6 magic to dhcpv6 library

6 years agoUpdate cutest framework
Arran Cudbard-Bell [Thu, 7 Nov 2019 18:47:53 +0000 (12:47 -0600)] 
Update cutest framework

6 years agoDisable lsan suppressions text by default so that it doesn't interfere with text...
Arran Cudbard-Bell [Thu, 7 Nov 2019 18:39:00 +0000 (12:39 -0600)] 
Disable lsan suppressions text by default so that it doesn't interfere with text from utilities closes #3110

6 years agoVENDOR attributes are TLVs, too
Alan T. DeKok [Thu, 7 Nov 2019 17:17:02 +0000 (12:17 -0500)] 
VENDOR attributes are TLVs, too

6 years agoSet gctx before destructor
Arran Cudbard-Bell [Thu, 7 Nov 2019 16:53:37 +0000 (10:53 -0600)] 
Set gctx before destructor

6 years agoDon't need suppressions set
Arran Cudbard-Bell [Thu, 7 Nov 2019 16:47:15 +0000 (10:47 -0600)] 
Don't need suppressions set

6 years agoadd child_ctx struct and functions
Alan T. DeKok [Thu, 7 Nov 2019 16:44:10 +0000 (11:44 -0500)] 
add child_ctx struct and functions

so that when we initialize multiple siblings, they can be freed
in reverse order.  This process helps to ensure dependencies
and order are managed correctly

6 years agodecode TLVs, too
Alan T. DeKok [Thu, 7 Nov 2019 16:41:09 +0000 (11:41 -0500)] 
decode TLVs, too

6 years agothe decoder doesn't do TLVs yet.
Alan T. DeKok [Thu, 7 Nov 2019 16:29:02 +0000 (11:29 -0500)] 
the decoder doesn't do TLVs yet.

6 years agoAdd tests for DHCPv6 / rfc6939 (#3098)
Jorge Pereira [Thu, 7 Nov 2019 15:34:08 +0000 (12:34 -0300)] 
Add tests for DHCPv6 / rfc6939 (#3098)

* The 'Client-Link-Layer' should be a 'struct'

* Add tests for DHCPv6 / rfc6939

6 years agoAdd 'decode-pair' for dhcpv6 unit tests (#3104)
Jorge Pereira [Thu, 7 Nov 2019 15:23:29 +0000 (12:23 -0300)] 
Add 'decode-pair' for dhcpv6 unit tests (#3104)

6 years agoExplicitly free temporary tmpl Closes #3109
Arran Cudbard-Bell [Thu, 7 Nov 2019 15:04:33 +0000 (09:04 -0600)] 
Explicitly free temporary tmpl Closes #3109

6 years agoDon't leak memory in json_pair_alloc_leaf (#3108)
Jorge Pereira [Thu, 7 Nov 2019 15:02:37 +0000 (12:02 -0300)] 
Don't leak memory in json_pair_alloc_leaf (#3108)

* Don't free NULL pointer

* Don't leak memory in json_pair_alloc_leaf

6 years agoWhitespace
Arran Cudbard-Bell [Thu, 7 Nov 2019 14:59:52 +0000 (08:59 -0600)] 
Whitespace

6 years agoMark dictionaries as read only *before* mprotecting the global pool
Arran Cudbard-Bell [Thu, 7 Nov 2019 14:35:57 +0000 (08:35 -0600)] 
Mark dictionaries as read only *before* mprotecting the global pool

6 years agoClarify what needs to be correct
Arran Cudbard-Bell [Thu, 7 Nov 2019 14:21:11 +0000 (08:21 -0600)] 
Clarify what needs to be correct

6 years agore-enable autofree, and add sanity checks to dict gctx
Arran Cudbard-Bell [Thu, 7 Nov 2019 14:14:30 +0000 (08:14 -0600)] 
re-enable autofree, and add sanity checks to dict gctx

to prevent it being freed if dictionaries are still loaded

6 years agoAdd gctx to dict struct
Arran Cudbard-Bell [Wed, 6 Nov 2019 23:49:37 +0000 (17:49 -0600)] 
Add gctx to dict struct

6 years agoFixup dict free functions to work in the gctx the dictionary was allocated
Arran Cudbard-Bell [Wed, 6 Nov 2019 23:29:58 +0000 (17:29 -0600)] 
Fixup dict free functions to work in the gctx the dictionary was allocated

Fixup unit_test_attribute to allocate test dictionaries in a different gctx

6 years agoUse talloc_get_type_abort_const
Arran Cudbard-Bell [Wed, 6 Nov 2019 23:27:38 +0000 (17:27 -0600)] 
Use talloc_get_type_abort_const

6 years agowe need more memory in the default global pool.
Alan T. DeKok [Wed, 6 Nov 2019 22:21:24 +0000 (17:21 -0500)] 
we need more memory in the default global pool.

It would be nice if the functions would check for OOM in the
global pool and return a descriptive error.

6 years agocheck for OOM errors
Alan T. DeKok [Wed, 6 Nov 2019 22:20:37 +0000 (17:20 -0500)] 
check for OOM errors

6 years agocheck limit before dereferencing it
Alan T. DeKok [Wed, 6 Nov 2019 17:28:40 +0000 (12:28 -0500)] 
check limit before dereferencing it

6 years agoerror out on memory allocation failures
Alan T. DeKok [Wed, 6 Nov 2019 17:26:01 +0000 (12:26 -0500)] 
error out on memory allocation failures

6 years agoshut up PVS studio
Alan T. DeKok [Wed, 6 Nov 2019 17:24:34 +0000 (12:24 -0500)] 
shut up PVS studio

6 years agocheck for memory allocation failures
Alan T. DeKok [Wed, 6 Nov 2019 17:22:14 +0000 (12:22 -0500)] 
check for memory allocation failures

6 years agomove assert to before dereference of variable
Alan T. DeKok [Wed, 6 Nov 2019 17:21:18 +0000 (12:21 -0500)] 
move assert to before dereference of variable

6 years agoTypo (#3106)
Jorge Pereira [Wed, 6 Nov 2019 21:27:36 +0000 (18:27 -0300)] 
Typo (#3106)

6 years agoMove to a read only "config" struct in unit_test_attribute
Arran Cudbard-Bell [Wed, 6 Nov 2019 20:27:58 +0000 (14:27 -0600)] 
Move to a read only "config" struct in unit_test_attribute

6 years agoStupid const issues
Arran Cudbard-Bell [Wed, 6 Nov 2019 20:08:16 +0000 (14:08 -0600)] 
Stupid const issues

This reverts commit dd6375099cb27af6af99fe6fa6d45652a552759a.

6 years agoHere too.
Arran Cudbard-Bell [Wed, 6 Nov 2019 19:43:37 +0000 (13:43 -0600)] 
Here too.

6 years agoNULLify pointers on dl_free
Arran Cudbard-Bell [Wed, 6 Nov 2019 19:42:48 +0000 (13:42 -0600)] 
NULLify pointers on dl_free

6 years agoFree dictionaries later
Arran Cudbard-Bell [Wed, 6 Nov 2019 19:38:22 +0000 (13:38 -0600)] 
Free dictionaries later

6 years agoReturn how many references remain when freeing dictionaries
Arran Cudbard-Bell [Wed, 6 Nov 2019 19:14:29 +0000 (13:14 -0600)] 
Return how many references remain when freeing dictionaries

6 years agoBe nicer about NULL pointers in dl_free
Arran Cudbard-Bell [Wed, 6 Nov 2019 19:07:00 +0000 (13:07 -0600)] 
Be nicer about NULL pointers in dl_free

6 years agoMore grr...
Arran Cudbard-Bell [Wed, 6 Nov 2019 19:05:34 +0000 (13:05 -0600)] 
More grr...

6 years agoGrr...
Arran Cudbard-Bell [Wed, 6 Nov 2019 19:03:57 +0000 (13:03 -0600)] 
Grr...

6 years agoTypo
Arran Cudbard-Bell [Wed, 6 Nov 2019 19:00:50 +0000 (13:00 -0600)] 
Typo

6 years agoMake talloc_const_free return an error code
Arran Cudbard-Bell [Wed, 6 Nov 2019 18:59:46 +0000 (12:59 -0600)] 
Make talloc_const_free return an error code

Make talloc_decrease_ref_count return the number of remaining references.

Add explicit dl_free function.