]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
5 years agoAdd functions to link in entries before and after another entry
Arran Cudbard-Bell [Fri, 16 Apr 2021 20:37:48 +0000 (15:37 -0500)] 
Add functions to link in entries before and after another entry

This allows for dlists which don't use a head

5 years agotypo
Alan T. DeKok [Fri, 16 Apr 2021 20:18:11 +0000 (16:18 -0400)] 
typo

5 years agofix prototype
Alan T. DeKok [Fri, 16 Apr 2021 20:08:31 +0000 (16:08 -0400)] 
fix prototype

5 years agoput 'case' statements into an htrie
Alan T. DeKok [Fri, 16 Apr 2021 19:57:21 +0000 (15:57 -0400)] 
put 'case' statements into an htrie

5 years agoadd "hint" function
Alan T. DeKok [Fri, 16 Apr 2021 19:56:55 +0000 (15:56 -0400)] 
add "hint" function

5 years agojust do fr_value_box_hash()
Alan T. DeKok [Fri, 16 Apr 2021 18:58:10 +0000 (14:58 -0400)] 
just do fr_value_box_hash()

it doesn't make sense to always call hash_update() with an
initial hash of 0.  The initial hash constant matters, and can
strongly affect hashing results.

5 years agoadd fr_value_box_to_key()
Alan T. DeKok [Fri, 16 Apr 2021 18:48:48 +0000 (14:48 -0400)] 
add fr_value_box_to_key()

5 years agov4: Initial version of performace tests for fr_pair_list_t operations (#4063)
Nick Porter [Fri, 16 Apr 2021 19:50:24 +0000 (20:50 +0100)] 
v4: Initial version of performace tests for fr_pair_list_t operations (#4063)

* Update acutest.h to latest

* Amend acutest.h so that messages logged in test processes are passed...

... to the parent and if XML output is enabled are included in the
output using the <system-out /> tag.

TEST_MSG() split into two macros:
  - TEST_MSG_FAIL() which only outputs if a test fails
  - TEST_MSG_ALWAYS() which outputs on both success and failure

TEST_DUMP() split into two macros:
  - TEST_DUMP_FAIL() which only outputs if a test fails
  - TEST_DUMP_ALWAYS() which outputs on both success and failure

* Initial version of pair_list_perf_test utility

For performance checking pair list operations. Uses acutest framework to
manage tests.

If a "-x <filename>" option is used, will output performance results in
an XML file.

5 years agoAdd missing public "replace" function
Arran Cudbard-Bell [Fri, 16 Apr 2021 19:49:40 +0000 (14:49 -0500)] 
Add missing public "replace" function

5 years agoAdd docs, remove macros...
Arran Cudbard-Bell [Fri, 16 Apr 2021 19:35:35 +0000 (14:35 -0500)] 
Add docs, remove macros...

5 years agoOne more...
Arran Cudbard-Bell [Fri, 16 Apr 2021 19:03:48 +0000 (14:03 -0500)] 
One more...

5 years agoSync up num_elements
Arran Cudbard-Bell [Fri, 16 Apr 2021 19:02:27 +0000 (14:02 -0500)] 
Sync up num_elements

5 years agoUse the cmp macro in fr_time_cmp
Arran Cudbard-Bell [Fri, 16 Apr 2021 18:39:41 +0000 (13:39 -0500)] 
Use the cmp macro in fr_time_cmp

5 years agoSpecify the json-c version we need
Arran Cudbard-Bell [Fri, 16 Apr 2021 18:21:21 +0000 (13:21 -0500)] 
Specify the json-c version we need

5 years agoRemove locking in our rbtree implementation
Arran Cudbard-Bell [Fri, 16 Apr 2021 17:54:00 +0000 (12:54 -0500)] 
Remove locking in our rbtree implementation

It was used in exactly one place and isn't terribly useful

Also add "init" varient of tree creation functions for initialising trees inline.

5 years agov4: Convert %(soh: ) to new xlat api (#4062)
Nick Porter [Fri, 16 Apr 2021 18:33:05 +0000 (19:33 +0100)] 
v4: Convert %(soh: ) to new xlat api (#4062)

* Convert %(soh: ) to new xlat api

* Correct interpretation of windows version numbers

* Add test for %(soh: ) xlat

5 years agorb_remove should return the thing it removed
Alan T. DeKok [Fri, 16 Apr 2021 15:22:06 +0000 (11:22 -0400)] 
rb_remove should return the thing it removed

5 years agoJust use a single trie alloc function
Arran Cudbard-Bell [Fri, 16 Apr 2021 15:14:41 +0000 (10:14 -0500)] 
Just use a single trie alloc function

Most of these uses should be fixed up to use a key callback anyway....

5 years agov4: Convert %(modhex2hex: ) to new xlat api (#4056)
Nick Porter [Fri, 16 Apr 2021 14:59:21 +0000 (15:59 +0100)] 
v4: Convert %(modhex2hex: ) to new xlat api (#4056)

* Convert %{modhex2hex: } to new xlat api

* Correctly load yubikey attribute references

* Free dictionary on module unload

* Add tests for %{modhextohex: }

* Correct working of modhex2hex()

5 years agov4: Convert %{jpathvalidate: } to new xlat api (#4057)
Nick Porter [Fri, 16 Apr 2021 14:59:02 +0000 (15:59 +0100)] 
v4: Convert %{jpathvalidate: } to new xlat api (#4057)

* Move %{jpathvalidate: } to new xlat api

* Don't re-escape '\'

5 years agoinitial rev of hash / rb / patricia trie
Alan T. DeKok [Fri, 16 Apr 2021 14:29:43 +0000 (10:29 -0400)] 
initial rev of hash / rb / patricia trie

5 years agoadd data oriented API to match rb / hash APIs
Alan T. DeKok [Fri, 16 Apr 2021 13:59:17 +0000 (09:59 -0400)] 
add data oriented API to match rb / hash APIs

5 years agoCI fixes for Dovecot on Ubuntu 20.04 (#4061)
Terry Burton [Fri, 16 Apr 2021 13:46:53 +0000 (14:46 +0100)] 
CI fixes for Dovecot on Ubuntu 20.04 (#4061)

5 years agoBump ubuntu up to 20.04
Arran Cudbard-Bell [Fri, 16 Apr 2021 00:58:47 +0000 (19:58 -0500)] 
Bump ubuntu up to 20.04

5 years agoAllow normally versioned packages for libjson-c
Arran Cudbard-Bell [Fri, 16 Apr 2021 00:56:39 +0000 (19:56 -0500)] 
Allow normally versioned packages for libjson-c

5 years agoTree is used
Arran Cudbard-Bell [Fri, 16 Apr 2021 00:45:22 +0000 (19:45 -0500)] 
Tree is used

5 years agoRemove json packages which are no longer appropriate
Arran Cudbard-Bell [Fri, 16 Apr 2021 00:43:19 +0000 (19:43 -0500)] 
Remove json packages which are no longer appropriate

5 years agoWork around strange issue in module loading code that causes SEGVs only under github...
Arran Cudbard-Bell [Fri, 16 Apr 2021 00:39:17 +0000 (19:39 -0500)] 
Work around strange issue in module loading code that causes SEGVs only under github actions...

5 years agoBe better about zeroing out inline fr_rb_node_t
Arran Cudbard-Bell [Fri, 16 Apr 2021 00:33:08 +0000 (19:33 -0500)] 
Be better about zeroing out inline fr_rb_node_t

5 years agoHack to alter the behaviour of fr_rb_replace depending on whether in the fr_node_t...
Arran Cudbard-Bell [Fri, 16 Apr 2021 00:30:26 +0000 (19:30 -0500)] 
Hack to alter the behaviour of fr_rb_replace depending on whether in the fr_node_t is inline with the data structure

5 years agoAdd rbtree variants which allocate fr_rb_node_t
Arran Cudbard-Bell [Fri, 16 Apr 2021 00:14:45 +0000 (19:14 -0500)] 
Add rbtree variants which allocate fr_rb_node_t

Switch most uses to "inline" where the fr_rb_node_t is part of the data structure.  This significantly lowers the number of mallocs needed when processing requests.

5 years agoFix more name conflicts
Arran Cudbard-Bell [Thu, 15 Apr 2021 23:22:47 +0000 (18:22 -0500)] 
Fix more name conflicts

5 years agoFix name conflict
Arran Cudbard-Bell [Thu, 15 Apr 2021 23:22:47 +0000 (18:22 -0500)] 
Fix name conflict

5 years agoCleanup trie code slightly
Arran Cudbard-Bell [Thu, 15 Apr 2021 21:50:29 +0000 (16:50 -0500)] 
Cleanup trie code slightly

5 years agoOr just set inlen correctly when in is NULL
Arran Cudbard-Bell [Thu, 15 Apr 2021 20:23:03 +0000 (15:23 -0500)] 
Or just set inlen correctly when in is NULL

5 years agoOther clang scan fixes
Arran Cudbard-Bell [Thu, 15 Apr 2021 20:17:25 +0000 (15:17 -0500)] 
Other clang scan fixes

5 years agoEnsure NULL input data is sufficiently large
Arran Cudbard-Bell [Thu, 15 Apr 2021 20:17:09 +0000 (15:17 -0500)] 
Ensure NULL input data is sufficiently large

5 years agoAdd fr_rb_replace, fr_rb_remove, remove RB_FLAG_REPLACE
Arran Cudbard-Bell [Thu, 15 Apr 2021 19:22:56 +0000 (14:22 -0500)] 
Add fr_rb_replace, fr_rb_remove, remove RB_FLAG_REPLACE

5 years agoOnly operate on client->ht if it exists
Arran Cudbard-Bell [Thu, 15 Apr 2021 18:09:59 +0000 (13:09 -0500)] 
Only operate on client->ht if it exists

5 years agoAssert when client doesn't have hash table
Arran Cudbard-Bell [Thu, 15 Apr 2021 17:28:11 +0000 (12:28 -0500)] 
Assert when client doesn't have hash table

5 years agoMove hash function signature into hash.h
Arran Cudbard-Bell [Thu, 15 Apr 2021 17:27:56 +0000 (12:27 -0500)] 
Move hash function signature into hash.h

5 years agoRemove hash table walk function
Arran Cudbard-Bell [Thu, 15 Apr 2021 16:53:11 +0000 (11:53 -0500)] 
Remove hash table walk function

Standardise the public hash table API to make it more similar to the rbtree API

5 years agochange rlm_cache_rb_t back to rlm_cache_rbtree_t
Arran Cudbard-Bell [Thu, 15 Apr 2021 16:51:00 +0000 (11:51 -0500)] 
change rlm_cache_rb_t back to rlm_cache_rbtree_t

5 years agoLast rbtree rename...
Arran Cudbard-Bell [Thu, 15 Apr 2021 15:11:24 +0000 (10:11 -0500)] 
Last rbtree rename...

5 years agoAdd the `fr` prefix drop the `tree` component
Arran Cudbard-Bell [Thu, 15 Apr 2021 14:59:32 +0000 (09:59 -0500)] 
Add the `fr` prefix drop the `tree` component

5 years agoremove entry_point
Arran Cudbard-Bell [Thu, 15 Apr 2021 02:19:06 +0000 (21:19 -0500)] 
remove entry_point

5 years agoThis bug has probably been fixed for a decade or more
Arran Cudbard-Bell [Wed, 14 Apr 2021 23:29:37 +0000 (18:29 -0500)] 
This bug has probably been fixed for a decade or more

5 years agonot needed
Matthew Newton [Thu, 15 Apr 2021 00:25:22 +0000 (01:25 +0100)] 
not needed

5 years agofix the doxygen html install
Matthew Newton [Wed, 14 Apr 2021 23:46:01 +0000 (00:46 +0100)] 
fix the doxygen html install

5 years agodocker: don't get confused with arm64 pandoc releases
Matthew Newton [Wed, 14 Apr 2021 23:35:58 +0000 (00:35 +0100)] 
docker: don't get confused with arm64 pandoc releases

5 years agodockerbuild: more useful help
Matthew Newton [Wed, 14 Apr 2021 22:04:32 +0000 (23:04 +0100)] 
dockerbuild: more useful help

5 years agodockerbuild: don't die with no args
Matthew Newton [Wed, 14 Apr 2021 22:01:35 +0000 (23:01 +0100)] 
dockerbuild: don't die with no args

5 years agofix typo
Alan T. DeKok [Wed, 14 Apr 2021 21:02:50 +0000 (17:02 -0400)] 
fix typo

5 years agoRFC 8996 deprecates TLS 1.0 and 1.1. Complain if they are used
Alan T. DeKok [Wed, 14 Apr 2021 19:23:17 +0000 (15:23 -0400)] 
RFC 8996 deprecates TLS 1.0 and 1.1.  Complain if they are used

5 years agono need to have "templates { templates { ... } }"
Alan T. DeKok [Wed, 14 Apr 2021 12:55:48 +0000 (08:55 -0400)] 
no need to have "templates { templates { ... } }"

5 years agouse OpenSSL APIs from 1.0.2 or later
Alan T. DeKok [Tue, 13 Apr 2021 14:44:42 +0000 (10:44 -0400)] 
use OpenSSL APIs from 1.0.2 or later

which will automatically pick the correct curve.

5 years agoqsort comparison has a different prototype than fr_cmp_t
Alan T. DeKok [Tue, 13 Apr 2021 14:35:34 +0000 (10:35 -0400)] 
qsort comparison has a different prototype than fr_cmp_t

5 years agoCorrect sqlippool messages
Nick Porter [Tue, 13 Apr 2021 11:33:39 +0000 (12:33 +0100)] 
Correct sqlippool messages

5 years agoCorrect alternation in dhcp site
Nick Porter [Tue, 13 Apr 2021 11:31:00 +0000 (12:31 +0100)] 
Correct alternation in dhcp site

5 years agoInitialise pointers to CONF_SECTION for sections not present in config
Nick Porter [Tue, 13 Apr 2021 10:48:04 +0000 (11:48 +0100)] 
Initialise pointers to CONF_SECTION for sections not present in config

Without this, processing sections with no config such as a "send Offer"
seg fault when trying to look up compiled CONF_SECTION

5 years agoWe "send" DHCP_DO_NOT_RESPOND, rather than receive
Nick Porter [Tue, 13 Apr 2021 09:00:17 +0000 (10:00 +0100)] 
We "send" DHCP_DO_NOT_RESPOND, rather than receive

5 years agosizeof(char *) is 8. Insteadm we want strlen(ptr)
Alan T. DeKok [Tue, 13 Apr 2021 14:14:37 +0000 (10:14 -0400)] 
sizeof(char *) is 8.  Insteadm we want strlen(ptr)

5 years agoRevert "Revert "decode RADIUS TLVs as nested pairs.""
Alan T. DeKok [Mon, 12 Apr 2021 21:40:14 +0000 (17:40 -0400)] 
Revert "Revert "decode RADIUS TLVs as nested pairs.""

This reverts commit 1e05cfd5c09c770213c5b7bf6f807f59ce413015.

5 years agono idea why this was missed
Alan T. DeKok [Mon, 12 Apr 2021 21:37:26 +0000 (17:37 -0400)] 
no idea why this was missed

5 years agoRevert "use current VP after encoding TLVs, not next one"
Alan T. DeKok [Mon, 12 Apr 2021 21:35:43 +0000 (17:35 -0400)] 
Revert "use current VP after encoding TLVs, not next one"

This reverts commit dee6addf999a8024ad39ac6b511e982cee75158b.

5 years agoupdate to fr_cmp_t prototype
Alan T. DeKok [Mon, 12 Apr 2021 21:29:22 +0000 (17:29 -0400)] 
update to fr_cmp_t prototype

5 years agouse macros, so the tests don't have huge lines of text
Alan T. DeKok [Sun, 11 Apr 2021 11:42:17 +0000 (07:42 -0400)] 
use macros, so the tests don't have huge lines of text

5 years agoadd (and use) "length" to fr_pair_list_afrom_str()
Alan T. DeKok [Sat, 10 Apr 2021 18:50:16 +0000 (14:50 -0400)] 
add (and use) "length" to fr_pair_list_afrom_str()

ideally the input should either be sbuffs or valud_boxes, but
this is at least a bit of a better start

5 years agoAllow relative attributes in SQL.
Alan T. DeKok [Sat, 10 Apr 2021 13:24:34 +0000 (09:24 -0400)] 
Allow relative attributes in SQL.

And add test cases for it.

5 years agomake sql_foo tests depend on rlm_sql.la, too
Alan T. DeKok [Sat, 10 Apr 2021 13:14:00 +0000 (09:14 -0400)] 
make sql_foo tests depend on rlm_sql.la, too

5 years agoremove unused prototypes
Alan T. DeKok [Sat, 10 Apr 2021 11:55:47 +0000 (07:55 -0400)] 
remove unused prototypes

5 years agomake sql_pair_list_afrom_str() private
Alan T. DeKok [Sat, 10 Apr 2021 11:53:38 +0000 (07:53 -0400)] 
make sql_pair_list_afrom_str() private

in preparation for updating it's API to use relative attributes

5 years agoallow for relative attribute names in files on disk
Alan T. DeKok [Fri, 9 Apr 2021 21:10:19 +0000 (17:10 -0400)] 
allow for relative attribute names in files on disk

foo = { },
.bar = baz,  # will go into foo

foo = { bar = baz }
.arg = 1 # will go into foo
yes = 43 # no leading '.', will not go into "foo"

This won't work for multiple layers of nesting.  i.e. you can't
do "..bar" to back 2 levels.

5 years agocall internal function instead of public one
Alan T. DeKok [Fri, 9 Apr 2021 15:31:31 +0000 (11:31 -0400)] 
call internal function instead of public one

in preparation for adding support for relative attributes

5 years agoif we're recursing into a group, parent is the group attribute
Alan T. DeKok [Fri, 9 Apr 2021 14:54:55 +0000 (10:54 -0400)] 
if we're recursing into a group, parent is the group attribute

5 years agoallow empty groups
Alan T. DeKok [Fri, 9 Apr 2021 14:51:33 +0000 (10:51 -0400)] 
allow empty groups

5 years agotemporarily mangle it all onto one line
Alan T. DeKok [Fri, 9 Apr 2021 14:40:44 +0000 (10:40 -0400)] 
temporarily mangle it all onto one line

unit_test_module hasn't been updated for the nested decoder
changes.  So if you give it a flat list, it will create a flat
list.

For now, just put it all onto one line.  This gives us time
to fix fr_pair_list_afrom_file() to read "relative" attributes

5 years agorespect the "concat" flag when decoding TLVs
Alan T. DeKok [Fri, 9 Apr 2021 13:51:32 +0000 (09:51 -0400)] 
respect the "concat" flag when decoding TLVs

and add digest tests for the same.

5 years agoallow "concat" for TLV types in RADIUS.
Alan T. DeKok [Fri, 9 Apr 2021 12:21:16 +0000 (08:21 -0400)] 
allow "concat" for TLV types in RADIUS.

and ensure that setting the flag doesn't change the behavior
for attributes of type "octets"

5 years agoclean up in an attempt to shut up the compiler
Alan T. DeKok [Fri, 9 Apr 2021 11:03:47 +0000 (07:03 -0400)] 
clean up in an attempt to shut up the compiler

5 years agoadd tests for encode / decode of digest attributes
Alan T. DeKok [Thu, 8 Apr 2021 22:00:56 +0000 (18:00 -0400)] 
add tests for encode / decode of digest attributes

5 years agomove code to shut up clang
Alan T. DeKok [Thu, 8 Apr 2021 21:21:23 +0000 (17:21 -0400)] 
move code to shut up clang

5 years agoallow for PAIR_ENCODE_SKIPPED
Alan T. DeKok [Thu, 8 Apr 2021 21:02:27 +0000 (17:02 -0400)] 
allow for PAIR_ENCODE_SKIPPED

because people might put the wrong thing into a child group/tlv
OR they might put something which shouldn't be encoded here.

5 years agoallow encoding of nested Vendor-Specific / Vendor types
Alan T. DeKok [Thu, 8 Apr 2021 20:51:46 +0000 (16:51 -0400)] 
allow encoding of nested Vendor-Specific / Vendor types

There are still things to be done:

* we really want to have a flag which encodes one VSA at a time
* right now it encodes multiple VSAs into one Vendor-Specific,
  and then fails if there's an overflow.
* instead we want to catch the case of an overflow, encode a
  new Vendor-Specific / vendor header, and then continue
* we don't need any of this for VSAs in the extended space,
  because RFC 6929 Section 4 defines that each extended VSA
  starts off with one byte of vendor-type.  So we don't need
  any loops there.

5 years agogo to next here, too
Alan T. DeKok [Thu, 8 Apr 2021 20:17:30 +0000 (16:17 -0400)] 
go to next here, too

5 years agore-run the digest tests if we rebuild radiusd or rlm_digest
Alan T. DeKok [Thu, 8 Apr 2021 19:24:50 +0000 (15:24 -0400)] 
re-run the digest tests if we rebuild radiusd or rlm_digest

5 years agomake it work with nested VPs
Alan T. DeKok [Thu, 8 Apr 2021 19:19:02 +0000 (15:19 -0400)] 
make it work with nested VPs

5 years agoallow non-leaf types to have groups of sub-things
Alan T. DeKok [Thu, 8 Apr 2021 19:08:48 +0000 (15:08 -0400)] 
allow non-leaf types to have groups of sub-things

TBH, this should really be only for specific types which are
supported

5 years agorework to allow for Vendor = { ... }
Alan T. DeKok [Thu, 8 Apr 2021 16:30:45 +0000 (12:30 -0400)] 
rework to allow for Vendor = { ... }

not done yet, but at least we're one more layer in.

5 years agoencode leaf types with the fast path
Alan T. DeKok [Thu, 8 Apr 2021 16:22:46 +0000 (12:22 -0400)] 
encode leaf types with the fast path

5 years agomove "encode one vsa" to its own routine
Alan T. DeKok [Thu, 8 Apr 2021 14:56:26 +0000 (10:56 -0400)] 
move "encode one vsa" to its own routine

5 years agouse current VP after encoding TLVs, not next one
Alan T. DeKok [Thu, 8 Apr 2021 14:45:58 +0000 (10:45 -0400)] 
use current VP after encoding TLVs, not next one

5 years agoqsort() takes different prototype for cmp()
Alan T. DeKok [Mon, 12 Apr 2021 21:05:21 +0000 (17:05 -0400)] 
qsort() takes different prototype for cmp()

5 years agomove all foo_cmp() functions to using fr_cmp_t prototype
Alan T. DeKok [Mon, 12 Apr 2021 20:46:02 +0000 (16:46 -0400)] 
move all foo_cmp() functions to using fr_cmp_t prototype

5 years agomake names more constent, and use macros
Alan T. DeKok [Mon, 12 Apr 2021 18:34:42 +0000 (14:34 -0400)] 
make names more constent, and use macros

5 years agouse correct data structure
Alan T. DeKok [Mon, 12 Apr 2021 16:53:48 +0000 (12:53 -0400)] 
use correct data structure

5 years agomove to standard names
Alan T. DeKok [Mon, 12 Apr 2021 16:26:40 +0000 (12:26 -0400)] 
move to standard names

we use fr_tmp_cmp_t for the comparison function which returns "int",
as not all comparison functions have been updated to return "int8_t"

5 years agonotes and updates
Alan T. DeKok [Mon, 12 Apr 2021 16:26:27 +0000 (12:26 -0400)] 
notes and updates

5 years agoclean up
Alan T. DeKok [Sun, 11 Apr 2021 12:52:35 +0000 (08:52 -0400)] 
clean up

use "da" instead of "child", as it's more consistent.

Don't clamp "data_len", as it should be used when we see
"end of options" signifier, to indicate that the decode function
is eating all of the remaining data.

and, all of subsequent calls to various functions use data[1]
as the length, and ignore data_len

5 years agoUpdate documentation to match new xlat syntaxes (#4054)
Nick Porter [Mon, 12 Apr 2021 15:21:28 +0000 (16:21 +0100)] 
Update documentation to match new xlat syntaxes (#4054)