]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
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
Alan T. DeKok [Fri, 16 Apr 2021 20:18:11 +0000 (16:18 -0400)]
typo
Alan T. DeKok [Fri, 16 Apr 2021 20:08:31 +0000 (16:08 -0400)]
fix prototype
Alan T. DeKok [Fri, 16 Apr 2021 19:57:21 +0000 (15:57 -0400)]
put 'case' statements into an htrie
Alan T. DeKok [Fri, 16 Apr 2021 19:56:55 +0000 (15:56 -0400)]
add "hint" function
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.
Alan T. DeKok [Fri, 16 Apr 2021 18:48:48 +0000 (14:48 -0400)]
add fr_value_box_to_key()
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.
Arran Cudbard-Bell [Fri, 16 Apr 2021 19:49:40 +0000 (14:49 -0500)]
Add missing public "replace" function
Arran Cudbard-Bell [Fri, 16 Apr 2021 19:35:35 +0000 (14:35 -0500)]
Add docs, remove macros...
Arran Cudbard-Bell [Fri, 16 Apr 2021 19:03:48 +0000 (14:03 -0500)]
One more...
Arran Cudbard-Bell [Fri, 16 Apr 2021 19:02:27 +0000 (14:02 -0500)]
Sync up num_elements
Arran Cudbard-Bell [Fri, 16 Apr 2021 18:39:41 +0000 (13:39 -0500)]
Use the cmp macro in fr_time_cmp
Arran Cudbard-Bell [Fri, 16 Apr 2021 18:21:21 +0000 (13:21 -0500)]
Specify the json-c version we need
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.
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
Alan T. DeKok [Fri, 16 Apr 2021 15:22:06 +0000 (11:22 -0400)]
rb_remove should return the thing it removed
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....
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()
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 '\'
Alan T. DeKok [Fri, 16 Apr 2021 14:29:43 +0000 (10:29 -0400)]
initial rev of hash / rb / patricia trie
Alan T. DeKok [Fri, 16 Apr 2021 13:59:17 +0000 (09:59 -0400)]
add data oriented API to match rb / hash APIs
Terry Burton [Fri, 16 Apr 2021 13:46:53 +0000 (14:46 +0100)]
CI fixes for Dovecot on Ubuntu 20.04 (#4061)
Arran Cudbard-Bell [Fri, 16 Apr 2021 00:58:47 +0000 (19:58 -0500)]
Bump ubuntu up to 20.04
Arran Cudbard-Bell [Fri, 16 Apr 2021 00:56:39 +0000 (19:56 -0500)]
Allow normally versioned packages for libjson-c
Arran Cudbard-Bell [Fri, 16 Apr 2021 00:45:22 +0000 (19:45 -0500)]
Tree is used
Arran Cudbard-Bell [Fri, 16 Apr 2021 00:43:19 +0000 (19:43 -0500)]
Remove json packages which are no longer appropriate
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...
Arran Cudbard-Bell [Fri, 16 Apr 2021 00:33:08 +0000 (19:33 -0500)]
Be better about zeroing out inline fr_rb_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
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.
Arran Cudbard-Bell [Thu, 15 Apr 2021 23:22:47 +0000 (18:22 -0500)]
Fix more name conflicts
Arran Cudbard-Bell [Thu, 15 Apr 2021 23:22:47 +0000 (18:22 -0500)]
Fix name conflict
Arran Cudbard-Bell [Thu, 15 Apr 2021 21:50:29 +0000 (16:50 -0500)]
Cleanup trie code slightly
Arran Cudbard-Bell [Thu, 15 Apr 2021 20:23:03 +0000 (15:23 -0500)]
Or just set inlen correctly when in is NULL
Arran Cudbard-Bell [Thu, 15 Apr 2021 20:17:25 +0000 (15:17 -0500)]
Other clang scan fixes
Arran Cudbard-Bell [Thu, 15 Apr 2021 20:17:09 +0000 (15:17 -0500)]
Ensure NULL input data is sufficiently large
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
Arran Cudbard-Bell [Thu, 15 Apr 2021 18:09:59 +0000 (13:09 -0500)]
Only operate on client->ht if it exists
Arran Cudbard-Bell [Thu, 15 Apr 2021 17:28:11 +0000 (12:28 -0500)]
Assert when client doesn't have hash table
Arran Cudbard-Bell [Thu, 15 Apr 2021 17:27:56 +0000 (12:27 -0500)]
Move hash function signature into hash.h
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
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
Arran Cudbard-Bell [Thu, 15 Apr 2021 15:11:24 +0000 (10:11 -0500)]
Last rbtree rename...
Arran Cudbard-Bell [Thu, 15 Apr 2021 14:59:32 +0000 (09:59 -0500)]
Add the `fr` prefix drop the `tree` component
Arran Cudbard-Bell [Thu, 15 Apr 2021 02:19:06 +0000 (21:19 -0500)]
remove entry_point
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
Matthew Newton [Thu, 15 Apr 2021 00:25:22 +0000 (01:25 +0100)]
not needed
Matthew Newton [Wed, 14 Apr 2021 23:46:01 +0000 (00:46 +0100)]
fix the doxygen html install
Matthew Newton [Wed, 14 Apr 2021 23:35:58 +0000 (00:35 +0100)]
docker: don't get confused with arm64 pandoc releases
Matthew Newton [Wed, 14 Apr 2021 22:04:32 +0000 (23:04 +0100)]
dockerbuild: more useful help
Matthew Newton [Wed, 14 Apr 2021 22:01:35 +0000 (23:01 +0100)]
dockerbuild: don't die with no args
Alan T. DeKok [Wed, 14 Apr 2021 21:02:50 +0000 (17:02 -0400)]
fix typo
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
Alan T. DeKok [Wed, 14 Apr 2021 12:55:48 +0000 (08:55 -0400)]
no need to have "templates { templates { ... } }"
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.
Alan T. DeKok [Tue, 13 Apr 2021 14:35:34 +0000 (10:35 -0400)]
qsort comparison has a different prototype than fr_cmp_t
Nick Porter [Tue, 13 Apr 2021 11:33:39 +0000 (12:33 +0100)]
Correct sqlippool messages
Nick Porter [Tue, 13 Apr 2021 11:31:00 +0000 (12:31 +0100)]
Correct alternation in dhcp site
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
Nick Porter [Tue, 13 Apr 2021 09:00:17 +0000 (10:00 +0100)]
We "send" DHCP_DO_NOT_RESPOND, rather than receive
Alan T. DeKok [Tue, 13 Apr 2021 14:14:37 +0000 (10:14 -0400)]
sizeof(char *) is 8. Insteadm we want strlen(ptr)
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 .
Alan T. DeKok [Mon, 12 Apr 2021 21:37:26 +0000 (17:37 -0400)]
no idea why this was missed
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 .
Alan T. DeKok [Mon, 12 Apr 2021 21:29:22 +0000 (17:29 -0400)]
update to fr_cmp_t prototype
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
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
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.
Alan T. DeKok [Sat, 10 Apr 2021 13:14:00 +0000 (09:14 -0400)]
make sql_foo tests depend on rlm_sql.la, too
Alan T. DeKok [Sat, 10 Apr 2021 11:55:47 +0000 (07:55 -0400)]
remove unused prototypes
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
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.
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
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
Alan T. DeKok [Fri, 9 Apr 2021 14:51:33 +0000 (10:51 -0400)]
allow empty groups
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
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.
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"
Alan T. DeKok [Fri, 9 Apr 2021 11:03:47 +0000 (07:03 -0400)]
clean up in an attempt to shut up the compiler
Alan T. DeKok [Thu, 8 Apr 2021 22:00:56 +0000 (18:00 -0400)]
add tests for encode / decode of digest attributes
Alan T. DeKok [Thu, 8 Apr 2021 21:21:23 +0000 (17:21 -0400)]
move code to shut up clang
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.
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.
Alan T. DeKok [Thu, 8 Apr 2021 20:17:30 +0000 (16:17 -0400)]
go to next here, too
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
Alan T. DeKok [Thu, 8 Apr 2021 19:19:02 +0000 (15:19 -0400)]
make it work with nested VPs
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
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.
Alan T. DeKok [Thu, 8 Apr 2021 16:22:46 +0000 (12:22 -0400)]
encode leaf types with the fast path
Alan T. DeKok [Thu, 8 Apr 2021 14:56:26 +0000 (10:56 -0400)]
move "encode one vsa" to its own routine
Alan T. DeKok [Thu, 8 Apr 2021 14:45:58 +0000 (10:45 -0400)]
use current VP after encoding TLVs, not next one
Alan T. DeKok [Mon, 12 Apr 2021 21:05:21 +0000 (17:05 -0400)]
qsort() takes different prototype for cmp()
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
Alan T. DeKok [Mon, 12 Apr 2021 18:34:42 +0000 (14:34 -0400)]
make names more constent, and use macros
Alan T. DeKok [Mon, 12 Apr 2021 16:53:48 +0000 (12:53 -0400)]
use correct data structure
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"
Alan T. DeKok [Mon, 12 Apr 2021 16:26:27 +0000 (12:26 -0400)]
notes and updates
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
Nick Porter [Mon, 12 Apr 2021 15:21:28 +0000 (16:21 +0100)]
Update documentation to match new xlat syntaxes (#4054)