]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
5 years agoAdd test for less than and greater than to rlm_files
Nick Porter [Mon, 25 Jan 2021 09:38:23 +0000 (09:38 +0000)] 
Add test for less than and greater than to rlm_files

5 years agoAdd test for overwriting attributes in rlm_files
Nick Porter [Mon, 25 Jan 2021 09:18:42 +0000 (09:18 +0000)] 
Add test for overwriting attributes in rlm_files

5 years agoAdd test for prefix search in rlm_files
Nick Porter [Mon, 5 Oct 2020 16:28:43 +0000 (17:28 +0100)] 
Add test for prefix search in rlm_files

5 years agoadd patricia trie support
Alan T. DeKok [Mon, 26 Apr 2021 18:15:19 +0000 (14:15 -0400)] 
add patricia trie support

5 years agopretty much nothing needs users_file.h
Alan T. DeKok [Mon, 26 Apr 2021 18:12:22 +0000 (14:12 -0400)] 
pretty much nothing needs users_file.h

5 years agomove PAIR_LIST_LIST to using fr_value_box
Alan T. DeKok [Mon, 26 Apr 2021 18:11:18 +0000 (14:11 -0400)] 
move PAIR_LIST_LIST to using fr_value_box

5 years agomove DEFAULT handling to it's own list
Alan T. DeKok [Mon, 26 Apr 2021 17:33:05 +0000 (13:33 -0400)] 
move DEFAULT handling to it's own list

When we have htries for different data types, then we cannot
insert DEFAULT into the same htrie as for integers, as DEFAULT
doesn't parse as an integer.

5 years agomove rlm_files to using htrie code
Alan T. DeKok [Mon, 26 Apr 2021 15:56:35 +0000 (11:56 -0400)] 
move rlm_files to using htrie code

does not (yet) handle patricia tries.

5 years agomove OSX leak suppression to code
Alan T. DeKok [Mon, 26 Apr 2021 14:54:24 +0000 (10:54 -0400)] 
move OSX leak suppression to code

5 years ago...and another
Arran Cudbard-Bell [Sat, 24 Apr 2021 02:39:05 +0000 (21:39 -0500)] 
...and another

5 years agoRemove FreeBSD case
Arran Cudbard-Bell [Sat, 24 Apr 2021 00:12:48 +0000 (19:12 -0500)] 
Remove FreeBSD case

5 years agoRemov errant commas
Arran Cudbard-Bell [Sat, 24 Apr 2021 00:11:56 +0000 (19:11 -0500)] 
Remov errant commas

5 years agoThe CRYPTO_THREAD_lock_new leak isn't OS specific
Arran Cudbard-Bell [Fri, 23 Apr 2021 21:12:34 +0000 (16:12 -0500)] 
The CRYPTO_THREAD_lock_new leak isn't OS specific

5 years agoSuppress minor/startup leaks reported by heaptrack
Arran Cudbard-Bell [Fri, 23 Apr 2021 21:07:04 +0000 (16:07 -0500)] 
Suppress minor/startup leaks reported by heaptrack

5 years agoAccidentally removed...
Arran Cudbard-Bell [Fri, 23 Apr 2021 19:38:39 +0000 (14:38 -0500)] 
Accidentally removed...

5 years agoFix error
Arran Cudbard-Bell [Fri, 23 Apr 2021 19:38:28 +0000 (14:38 -0500)] 
Fix error

5 years agoRemove default_eap_type from test configs and update doucmentation
Arran Cudbard-Bell [Fri, 23 Apr 2021 18:52:37 +0000 (13:52 -0500)] 
Remove default_eap_type from test configs and update doucmentation

5 years agoAdd support for type_identity to EAP-SIM/AKA/AKA'
Arran Cudbard-Bell [Fri, 23 Apr 2021 18:22:43 +0000 (13:22 -0500)] 
Add support for type_identity to EAP-SIM/AKA/AKA'

5 years agoRemove cruft from rlm_eap
Arran Cudbard-Bell [Fri, 23 Apr 2021 18:22:11 +0000 (13:22 -0500)] 
Remove cruft from rlm_eap

5 years agoAdd docs for cf_log_*_by_child
Arran Cudbard-Bell [Fri, 23 Apr 2021 18:21:19 +0000 (13:21 -0500)] 
Add docs for cf_log_*_by_child

5 years agoAllow submodules to determine if they should be set for a given identity
Arran Cudbard-Bell [Fri, 23 Apr 2021 18:21:00 +0000 (13:21 -0500)] 
Allow submodules to determine if they should be set for a given identity

5 years agoMake outputs optional for sim/aka id functions, add conversion function to extract...
Arran Cudbard-Bell [Fri, 23 Apr 2021 17:50:56 +0000 (12:50 -0500)] 
Make outputs optional for sim/aka id functions, add conversion function to extract the eap type

5 years agoRemove duplicate/unused header
Arran Cudbard-Bell [Fri, 23 Apr 2021 17:50:16 +0000 (12:50 -0500)] 
Remove duplicate/unused header

5 years agoMove the CSV module to using htries
Alan T. DeKok [Thu, 22 Apr 2021 19:45:37 +0000 (15:45 -0400)] 
Move the CSV module to using htries

5 years agoupdate for latest behavior
Alan T. DeKok [Thu, 22 Apr 2021 19:27:03 +0000 (15:27 -0400)] 
update for latest behavior

5 years agoFix unitialized value (#4068)
Jorge Pereira [Thu, 22 Apr 2021 17:51:12 +0000 (14:51 -0300)] 
Fix unitialized value (#4068)

5 years agoIndex is special
Arran Cudbard-Bell [Thu, 22 Apr 2021 16:08:22 +0000 (11:08 -0500)] 
Index is special

5 years agoInitialise output
Arran Cudbard-Bell [Thu, 22 Apr 2021 16:05:36 +0000 (11:05 -0500)] 
Initialise output

5 years agoAdd test attribute instances
Arran Cudbard-Bell [Thu, 22 Apr 2021 15:47:35 +0000 (10:47 -0500)] 
Add test attribute instances

Makes it easy to duplicate a set of test attributes, giving each one a unique name and identifier

5 years agoStart of changing how list_perf_test operates
Arran Cudbard-Bell [Thu, 22 Apr 2021 15:15:18 +0000 (10:15 -0500)] 
Start of changing how list_perf_test operates

5 years agoAdd instance arg to fr_pair_find_by_da
Arran Cudbard-Bell [Wed, 21 Apr 2021 22:54:30 +0000 (17:54 -0500)] 
Add instance arg to fr_pair_find_by_da

5 years agoQuiet GCC
Arran Cudbard-Bell [Wed, 21 Apr 2021 20:14:31 +0000 (15:14 -0500)] 
Quiet GCC

5 years agoFix random whitespace issues in pair_list_perf_tests.c
Arran Cudbard-Bell [Wed, 21 Apr 2021 18:20:45 +0000 (13:20 -0500)] 
Fix random whitespace issues in pair_list_perf_tests.c

5 years agocpp indentation
Arran Cudbard-Bell [Wed, 21 Apr 2021 16:37:02 +0000 (11:37 -0500)] 
cpp indentation

5 years agoRemove duplicate code from pair tests
Arran Cudbard-Bell [Wed, 21 Apr 2021 16:34:55 +0000 (11:34 -0500)] 
Remove duplicate code from pair tests

5 years agoMake fr_rb_node do what it says
Arran Cudbard-Bell [Wed, 21 Apr 2021 16:25:19 +0000 (11:25 -0500)] 
Make fr_rb_node do what it says

5 years agov4: Add tests for rlm_rest - both module and xlat (#4065)
Nick Porter [Tue, 20 Apr 2021 16:19:08 +0000 (17:19 +0100)] 
v4: Add tests for rlm_rest - both module and xlat (#4065)

* Add setup script for openresty instance to test rlm_rest

* Install openresty in CI

* Add module tests for rlm_rest

* Test for %{rest: } xlat

5 years agoRemove another memcpy
Arran Cudbard-Bell [Tue, 20 Apr 2021 16:17:50 +0000 (11:17 -0500)] 
Remove another memcpy

5 years agoDisable the impressively useless "super-linter"
Arran Cudbard-Bell [Tue, 20 Apr 2021 16:17:24 +0000 (11:17 -0500)] 
Disable the impressively useless "super-linter"

5 years agoJust remove the damn assert. The rest of the code doesn't care about integer overflo...
Arran Cudbard-Bell [Tue, 20 Apr 2021 13:34:30 +0000 (08:34 -0500)] 
Just remove the damn assert.  The rest of the code doesn't care about integer overflow, it'll just stop the advance.

5 years agodon't check the results of delete, there may be no data to delete
Alan T. DeKok [Tue, 20 Apr 2021 13:32:54 +0000 (09:32 -0400)] 
don't check the results of delete, there may be no data to delete

5 years agoRevert "Revert "Fix SQL tests checking properly the query results (#4064)""
Alan T. DeKok [Tue, 20 Apr 2021 13:34:12 +0000 (09:34 -0400)] 
Revert "Revert "Fix SQL tests checking properly the query results (#4064)""

This reverts commit da11cc71763c4c21c6dc70d28d923346ad109dbd.

5 years agoIs the compiler really this stupid?
Arran Cudbard-Bell [Tue, 20 Apr 2021 13:27:19 +0000 (08:27 -0500)] 
Is the compiler really this stupid?

5 years agoRevert "add cast to shut up compiler"
Arran Cudbard-Bell [Tue, 20 Apr 2021 13:22:14 +0000 (08:22 -0500)] 
Revert "add cast to shut up compiler"

This reverts commit dfeadbdc389881fe541ced8ed7736202930272fd.

5 years agoRevert "shut UP compiler"
Arran Cudbard-Bell [Tue, 20 Apr 2021 13:22:06 +0000 (08:22 -0500)] 
Revert "shut UP compiler"

This reverts commit 8fc06a0d0e5b4cdd937b0a7e8726bc41836dc7c3.

5 years agoRevert "Fix SQL tests checking properly the query results (#4064)"
Arran Cudbard-Bell [Tue, 20 Apr 2021 13:21:47 +0000 (08:21 -0500)] 
Revert "Fix SQL tests checking properly the query results (#4064)"

This reverts commit d8626c17363b83d6329f5321ea67c84ca548ed59.

5 years agoshut UP compiler
Alan T. DeKok [Tue, 20 Apr 2021 10:34:57 +0000 (06:34 -0400)] 
shut UP compiler

5 years agoclean up encode_concat()
Alan T. DeKok [Tue, 20 Apr 2021 10:29:54 +0000 (06:29 -0400)] 
clean up encode_concat()

slen is for signed return values, not for unsigned data lengths,
among other things.

5 years agoadd cast to shut up compiler
Alan T. DeKok [Tue, 20 Apr 2021 10:11:44 +0000 (06:11 -0400)] 
add cast to shut up compiler

5 years agoreturn dbuff values, not intermediate variables
Alan T. DeKok [Tue, 20 Apr 2021 09:51:34 +0000 (05:51 -0400)] 
return dbuff values, not intermediate variables

5 years agoFix SQL tests checking properly the query results (#4064)
Jorge Pereira [Tue, 20 Apr 2021 09:27:58 +0000 (06:27 -0300)] 
Fix SQL tests checking properly the query results (#4064)

Use  macros, so the tests don't have huge lines of text

5 years agoRevert "decode VSAs and vendors as nested attributes."
Alan T. DeKok [Tue, 20 Apr 2021 09:19:59 +0000 (05:19 -0400)] 
Revert "decode VSAs and vendors as nested attributes."

This reverts commit e906e3d73ff649d16916405165ed7736fb496372.

5 years agos/attr_shift/attr_fragment
Arran Cudbard-Bell [Mon, 19 Apr 2021 22:44:41 +0000 (17:44 -0500)] 
s/attr_shift/attr_fragment

...and make it use dbuffs properly

5 years agoAllow the dbuff copying macros to work on dbuffs or markers
Arran Cudbard-Bell [Mon, 19 Apr 2021 22:41:29 +0000 (17:41 -0500)] 
Allow the dbuff copying macros to work on dbuffs or markers

5 years agofix up for extended VSAs
Alan T. DeKok [Mon, 19 Apr 2021 21:18:52 +0000 (17:18 -0400)] 
fix up for extended VSAs

5 years agoupdate description of function arguments
Alan T. DeKok [Mon, 19 Apr 2021 21:15:49 +0000 (17:15 -0400)] 
update description of function arguments

and note that the function simply doesn't work for extended VSAs
<sigh>

5 years agoremove unused variable
Alan T. DeKok [Mon, 19 Apr 2021 21:02:11 +0000 (17:02 -0400)] 
remove unused variable

5 years agoMore doc cleanups
Arran Cudbard-Bell [Mon, 19 Apr 2021 18:32:51 +0000 (13:32 -0500)] 
More doc cleanups

5 years agofix up attr_shift() so it isn't completely broken
Alan T. DeKok [Mon, 19 Apr 2021 18:06:56 +0000 (14:06 -0400)] 
fix up attr_shift() so it isn't completely broken

convert it to just use pointers, and clean up the code so that
it's readable.

And add these magical things called "tests"

5 years agolet's check for errors, if it's not too hard
Alan T. DeKok [Mon, 19 Apr 2021 12:06:30 +0000 (08:06 -0400)] 
let's check for errors, if it's not too hard

5 years agoThe WiMAX header is 9 octets, not 2.
Alan T. DeKok [Mon, 19 Apr 2021 12:03:02 +0000 (08:03 -0400)] 
The WiMAX header is 9 octets, not 2.

5 years agodecode VSAs and vendors as nested attributes.
Alan T. DeKok [Mon, 19 Apr 2021 11:17:23 +0000 (07:17 -0400)] 
decode VSAs and vendors as nested attributes.

Update the tests accordingly.

Note that WiMAX fails, as it does not correctly decode
"continued" attributes.  But it turns out that didn't work
previously, either.

5 years agosplit on total length of attribute, not on encoded value length
Alan T. DeKok [Mon, 19 Apr 2021 11:10:14 +0000 (07:10 -0400)] 
split on total length of attribute, not on encoded value length

5 years agofix typo
Alan T. DeKok [Mon, 19 Apr 2021 10:59:48 +0000 (06:59 -0400)] 
fix typo

5 years agocomments and renaming
Alan T. DeKok [Mon, 19 Apr 2021 10:28:36 +0000 (06:28 -0400)] 
comments and renaming

use encode_attribute() instead of encode_tlv().  This function
encodes attributes in the standard 1/1 TLV format.  It does not
encode an attribute of type TLV.

In contrast, encode_vsa() will encode an attribute of type VSA,
encode_extended() will encode an attribute of type "extended",
etc.

5 years agounify encode_rfc_format() and encode_tlv()
Alan T. DeKok [Sun, 18 Apr 2021 20:26:33 +0000 (16:26 -0400)] 
unify encode_rfc_format() and encode_tlv()

there's just no reason for them to be gratuitously different

5 years agofix encoding of TLVs
Alan T. DeKok [Sun, 18 Apr 2021 19:56:09 +0000 (15:56 -0400)] 
fix encoding of TLVs

turns out encode_value() should be calling encode_tlv_children(),
and then we can get rid of more if / then / else checks scattered
throughout the code

5 years agowe can hard-code this
Alan T. DeKok [Sun, 18 Apr 2021 19:53:40 +0000 (15:53 -0400)] 
we can hard-code this

5 years agoincrease "depth" when encoding
Alan T. DeKok [Sun, 18 Apr 2021 19:46:46 +0000 (15:46 -0400)] 
increase "depth" when encoding

so that the encode_foo() functions get passed a DA of the type
which they're encoding

5 years agohoist encode_wimax() into encode_vendor()
Alan T. DeKok [Sun, 18 Apr 2021 19:41:06 +0000 (15:41 -0400)] 
hoist encode_wimax() into encode_vendor()

which then supports Vendor-Specific = { WiMAX = { ... } }

5 years agoAdditional debuff docs and renaming arguments
Arran Cudbard-Bell [Mon, 19 Apr 2021 18:24:52 +0000 (13:24 -0500)] 
Additional debuff docs and renaming arguments

5 years agoAdd note on fr_dbuff_move
Arran Cudbard-Bell [Mon, 19 Apr 2021 18:02:31 +0000 (13:02 -0500)] 
Add note on fr_dbuff_move

5 years agoAllow replacement of inline rbnodes
Arran Cudbard-Bell [Mon, 19 Apr 2021 14:00:22 +0000 (09:00 -0500)] 
Allow replacement of inline rbnodes

Much more efficient that a normal replace!

5 years agoclean up encode_extended()
Alan T. DeKok [Sun, 18 Apr 2021 16:44:38 +0000 (12:44 -0400)] 
clean up encode_extended()

remove unnecessary duplicate variables, extra dbuff copies.

5 years agouse consistent names
Alan T. DeKok [Sun, 18 Apr 2021 16:35:20 +0000 (12:35 -0400)] 
use consistent names

5 years agothere's no reason to make this signed
Alan T. DeKok [Sun, 18 Apr 2021 16:35:01 +0000 (12:35 -0400)] 
there's no reason to make this signed

5 years agoclean up and de-dup FR_DBUFF_MAX_NO_ADVANCE()
Alan T. DeKok [Sun, 18 Apr 2021 16:31:52 +0000 (12:31 -0400)] 
clean up and de-dup FR_DBUFF_MAX_NO_ADVANCE()

which was being called multiple times, depending on the call flow.

It now just passes the input buffers through, and any function
which knows it can only encode X bytes will do

work_dbuff = FR_DBUFF_MAX_NO_ADVANCE(dbuff, X)

There may also be issues with dbuffs, as the encode_extended()
was being called _always_ with max 255 bytes.  Yet it somehow
managed to encode more than 255 bytes in the tests

5 years agouse names, not numbers
Alan T. DeKok [Sun, 18 Apr 2021 16:26:03 +0000 (12:26 -0400)] 
use names, not numbers

5 years agouse different way of setting the length field
Alan T. DeKok [Sun, 18 Apr 2021 16:15:44 +0000 (12:15 -0400)] 
use different way of setting the length field

5 years agoonly use one byte
Alan T. DeKok [Sun, 18 Apr 2021 16:00:33 +0000 (12:00 -0400)] 
only use one byte

5 years agoremove double quotes
Alan T. DeKok [Sun, 18 Apr 2021 15:14:57 +0000 (11:14 -0400)] 
remove double quotes

5 years agoRemove node_ctx from rb_inline functions
Arran Cudbard-Bell [Sun, 18 Apr 2021 15:56:56 +0000 (10:56 -0500)] 
Remove node_ctx from rb_inline functions

Mark tree arg in fr_rb_find as const

5 years agoRemove fr_pair_find_by_num
Arran Cudbard-Bell [Sun, 18 Apr 2021 15:54:28 +0000 (10:54 -0500)] 
Remove fr_pair_find_by_num

5 years agoRemove fr_pair_list_free_item
Arran Cudbard-Bell [Sun, 18 Apr 2021 15:51:41 +0000 (10:51 -0500)] 
Remove fr_pair_list_free_item

5 years agoAdd test for dlist_move
Arran Cudbard-Bell [Sun, 18 Apr 2021 01:39:19 +0000 (20:39 -0500)] 
Add test for dlist_move

5 years agoAdd fr_dlist_entry_move
Arran Cudbard-Bell [Sun, 18 Apr 2021 01:39:04 +0000 (20:39 -0500)] 
Add fr_dlist_entry_move

5 years agoAdd function for checking if a node is in an rbtree
Arran Cudbard-Bell [Sun, 18 Apr 2021 01:38:42 +0000 (20:38 -0500)] 
Add function for checking if a node is in an rbtree

5 years agosimplify encode_wimax()
Alan T. DeKok [Sun, 18 Apr 2021 14:45:03 +0000 (10:45 -0400)] 
simplify encode_wimax()

similar to the previous commit.

5 years agosimplify encode_vendor_attr()
Alan T. DeKok [Sun, 18 Apr 2021 14:32:25 +0000 (10:32 -0400)] 
simplify encode_vendor_attr()

there's no need to have a large number of markers.  2 will do.
and don't call them src/dest.  Those names are meaningless.

5 years agomove vendor-specific encoding to encode_vendor_attr()
Alan T. DeKok [Sun, 18 Apr 2021 14:25:24 +0000 (10:25 -0400)] 
move vendor-specific encoding to encode_vendor_attr()

which is now more in line with encode_wimax(), which does the
same thing

5 years agoremove redundant code
Alan T. DeKok [Sun, 18 Apr 2021 13:46:56 +0000 (09:46 -0400)] 
remove redundant code

5 years agorename functions
Alan T. DeKok [Sun, 18 Apr 2021 13:39:09 +0000 (09:39 -0400)] 
rename functions

If they're all named _hdr(), then that's redundant.  We know that
VSAs and TLVs are not values.

Use more descriptive names than foo_internal().  All of these
functions are "static", and therefore internal.  Instead, give
them names according to their purpose.

5 years agoensure that fr_radius_decode_pair_value() always returns OK
Alan T. DeKok [Sat, 17 Apr 2021 18:34:10 +0000 (14:34 -0400)] 
ensure that fr_radius_decode_pair_value() always returns OK

it only returns -1 on programmer error, or OOM.  Otherwise,
it always returns a VP.  i.e. a real one, or a raw one.

5 years agoadd ASAN / LSAN options as appropriate
Alan T. DeKok [Sun, 18 Apr 2021 13:42:12 +0000 (09:42 -0400)] 
add ASAN / LSAN options as appropriate

so that "make test" on OSX doesn't have endless complaints about
leaks in libc

5 years agoFix pair_list_perf_test.c
Arran Cudbard-Bell [Sat, 17 Apr 2021 00:32:15 +0000 (19:32 -0500)] 
Fix pair_list_perf_test.c

5 years agoTypo
Arran Cudbard-Bell [Sat, 17 Apr 2021 00:06:58 +0000 (19:06 -0500)] 
Typo

5 years agoType validation... generally a good thing
Arran Cudbard-Bell [Fri, 16 Apr 2021 23:58:15 +0000 (18:58 -0500)] 
Type validation... generally a good thing

5 years agoUse conversion macros where appropriate in the dlist code
Arran Cudbard-Bell [Fri, 16 Apr 2021 23:49:04 +0000 (18:49 -0500)] 
Use conversion macros where appropriate in the dlist code

5 years agoMinor issues...
Arran Cudbard-Bell [Fri, 16 Apr 2021 23:21:51 +0000 (18:21 -0500)] 
Minor issues...

5 years agoAdd "old" argument to fr_*_replace to return the old data
Arran Cudbard-Bell [Fri, 16 Apr 2021 23:19:07 +0000 (18:19 -0500)] 
Add "old" argument to fr_*_replace to return the old data

This is to avoid multiple lookups in pair.c