]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
7 days agoadd documentation for states
Alan T. DeKok [Mon, 4 Aug 2025 20:57:00 +0000 (16:57 -0400)] 
add documentation for states

7 days agoadd function to create total order of attributes
Alan T. DeKok [Mon, 4 Aug 2025 14:44:49 +0000 (10:44 -0400)] 
add function to create total order of attributes

7 days agoUNUSED
Nick Porter [Mon, 4 Aug 2025 18:29:53 +0000 (19:29 +0100)] 
UNUSED

7 days agoFreeBSD has accept4()
Nick Porter [Mon, 4 Aug 2025 18:24:45 +0000 (19:24 +0100)] 
FreeBSD has accept4()

7 days agoEnsure we depend on non-broken libkqueue
Nick Porter [Mon, 4 Aug 2025 17:20:37 +0000 (18:20 +0100)] 
Ensure we depend on non-broken libkqueue

Some .deb platforms package libkqueue 2.3.1

7 days agoSimplify .deb ssl dependency logic
Nick Porter [Mon, 4 Aug 2025 16:38:32 +0000 (17:38 +0100)] 
Simplify .deb ssl dependency logic

since we require OpenSSL >= 3.0

7 days agoadd attribute type 'attr' and test VALUE
Alan T. DeKok [Mon, 4 Aug 2025 13:07:12 +0000 (09:07 -0400)] 
add attribute type 'attr' and test VALUE

not used for anything yet, because the encoder / decoder do not
support it

7 days agoallow '@' references for value box parser
Alan T. DeKok [Mon, 4 Aug 2025 12:49:34 +0000 (08:49 -0400)] 
allow '@' references for value box parser

the reference can't change dictionaries

7 days agoadd da root to value-box parser for VALUE
Alan T. DeKok [Mon, 4 Aug 2025 12:49:06 +0000 (08:49 -0400)] 
add da root to value-box parser for VALUE

7 days agoadd character set for allowed names of nested attrs
Alan T. DeKok [Mon, 4 Aug 2025 12:48:36 +0000 (08:48 -0400)] 
add character set for allowed names of nested attrs

which is the allowed list for attrs, plus '.'

7 days agofix error message
Alan T. DeKok [Mon, 4 Aug 2025 12:27:57 +0000 (08:27 -0400)] 
fix error message

8 days agoexport dict_protocol_reference, and make it take an sbuff
Alan T. DeKok [Sun, 3 Aug 2025 15:36:15 +0000 (11:36 -0400)] 
export dict_protocol_reference, and make it take an sbuff

in preparation for other work with @foo in value-boxes

8 days agouse FR_SBUFF_IN_STR() for common cases
Alan T. DeKok [Sun, 3 Aug 2025 15:18:01 +0000 (11:18 -0400)] 
use FR_SBUFF_IN_STR() for common cases

8 days agodefine FR_SBUFF_IN_STR() as a shorthand for IN(foo, strlen(foo))
Alan T. DeKok [Sun, 3 Aug 2025 15:12:30 +0000 (11:12 -0400)] 
define FR_SBUFF_IN_STR() as a shorthand for IN(foo, strlen(foo))

8 days agodisallow ::43 as enum names
Alan T. DeKok [Sun, 3 Aug 2025 14:56:33 +0000 (10:56 -0400)] 
disallow ::43 as enum names

9 days agodon't allow copying of cursors
Alan T. DeKok [Sat, 2 Aug 2025 10:56:41 +0000 (06:56 -0400)] 
don't allow copying of cursors

9 days agoprint the input expansion before running the function
Alan T. DeKok [Sat, 2 Aug 2025 10:53:19 +0000 (06:53 -0400)] 
print the input expansion before running the function

not afterwards.  this makes it much easier to read the debug output

9 days agoremove ACCEPTED state.
Alan T. DeKok [Sat, 2 Aug 2025 10:48:31 +0000 (06:48 -0400)] 
remove ACCEPTED state.

and more cleanups for accept. We can't re-open an accepted socket

10 days agore-add "char const *end" as allowed
Alan T. DeKok [Fri, 1 Aug 2025 18:45:24 +0000 (14:45 -0400)] 
re-add "char const *end" as allowed

10 days agoadd notes about attribute comparisons
Alan T. DeKok [Fri, 1 Aug 2025 18:36:40 +0000 (14:36 -0400)] 
add notes about attribute comparisons

10 days agohoist initialize output to macro
Alan T. DeKok [Fri, 1 Aug 2025 12:04:05 +0000 (08:04 -0400)] 
hoist initialize output to macro

so we don't have 'ifdef STATIC_ANALYZER' everywhere.  And hopefully
then since the initialization is unconditional, the analyzer will
actually figure out that the output is initialized.

10 days agoremove more "default:", and add more "case FR_TYPE_ATTR:"
Alan T. DeKok [Thu, 31 Jul 2025 17:24:29 +0000 (13:24 -0400)] 
remove more "default:", and add more "case FR_TYPE_ATTR:"

10 days agouse dictionary function to compare two attributes
Alan T. DeKok [Thu, 31 Jul 2025 17:22:02 +0000 (13:22 -0400)] 
use dictionary function to compare two attributes

comparing by only the leaf attr was arguably wrong, as it ignored
any depth or parenting.

we use an fr_dict function to do the comparison.  But that just
compares the pointers, and isn't stable.  Arguably that should
be fixed, too.

The fix depends on whether we want to just sort different attributes,
or whether we want to order them.  If we're just sorting them, then
the current code is OK.

10 days agoadd more size, and assert that max is initialized
Alan T. DeKok [Thu, 31 Jul 2025 17:21:39 +0000 (13:21 -0400)] 
add more size, and assert that max is initialized

10 days agounify unsupported cast code
Alan T. DeKok [Thu, 31 Jul 2025 16:28:43 +0000 (12:28 -0400)] 
unify unsupported cast code

10 days agomove generic to 1, so that returning -1 is better
Alan T. DeKok [Wed, 30 Jul 2025 21:21:52 +0000 (17:21 -0400)] 
move generic to 1, so that returning -1 is better

10 days agodon't allow fr_bio_fd_open() to be passed accepted sockets
Alan T. DeKok [Wed, 30 Jul 2025 11:55:43 +0000 (07:55 -0400)] 
don't allow fr_bio_fd_open() to be passed accepted sockets

we will fix fr_bio_fd_accept() in another commit.

11 days agoremove errant debug call developer/arr2036
Arran Cudbard-Bell [Thu, 31 Jul 2025 22:18:55 +0000 (15:18 -0700)] 
remove errant debug call

11 days agoAdopt a standard naming convention and signture for debug functions
James Jones [Fri, 31 Jan 2025 19:56:05 +0000 (13:56 -0600)] 
Adopt a standard naming convention and signture for debug functions

To get the "dd" debugger command to work without having to create an
wxplicit mapping from type to function either by hand or by runtime
inspection (the latter preventing setting up the command at debugger
startup), the debug functions that dd calls should have a type of
the form

    foo_debug(FILE *fp, foo_t const *)

We add the qualifier becausen
 * some support functions with extra parameters are meant to be
   called by these functions, which pass the additional parameters;
   the functions we do call can pass fp along, or in the case of
   src/lib/util/dict_print.c, add fp to the context
 * fe_dict_attr_t * has three debug functions
 * fr_pair_validate_debug() takes a pointer to an array, and
   thus can't follow the convention
 * virtual_server_{listen, process}_debug() and module_rlm_list_debug()
   have *no* parameters

11 days agoRevert "might as well save the result somewhere"
Arran Cudbard-Bell [Thu, 31 Jul 2025 06:48:52 +0000 (23:48 -0700)] 
Revert "might as well save the result somewhere"

This reverts commit 67362500acb9860f0175900236c182b4ae78d420.

11 days agoFix shallow copy for FR_TYPE_ATTR
Arran Cudbard-Bell [Thu, 31 Jul 2025 06:48:15 +0000 (23:48 -0700)] 
Fix shallow copy for FR_TYPE_ATTR

11 days agoFix includes
Arran Cudbard-Bell [Thu, 31 Jul 2025 06:48:04 +0000 (23:48 -0700)] 
Fix includes

11 days agoAlways check the return value from fr_value_box_copy
Arran Cudbard-Bell [Thu, 31 Jul 2025 06:47:40 +0000 (23:47 -0700)] 
Always check the return value from fr_value_box_copy

11 days agoAdd RADIUS Id and Authenticator to request pair list
Nick Porter [Thu, 31 Jul 2025 17:25:37 +0000 (18:25 +0100)] 
Add RADIUS Id and Authenticator to request pair list

11 days agoAdd json.encode regression test for DHCPv4 in RADIUS
Arran Cudbard-Bell [Thu, 31 Jul 2025 04:45:04 +0000 (21:45 -0700)] 
Add json.encode regression test for DHCPv4 in RADIUS

11 days agoThe enumv isn't an ancestor of the attribute being printed
Arran Cudbard-Bell [Thu, 31 Jul 2025 04:44:47 +0000 (21:44 -0700)] 
The enumv isn't an ancestor of the attribute being printed

11 days agoWhen storing an enum for later parsing, we need to store the '::' prefix too
Arran Cudbard-Bell [Thu, 31 Jul 2025 04:23:12 +0000 (21:23 -0700)] 
When storing an enum for later parsing, we need to store the '::' prefix too

11 days agoFix copying FR_TYPE_ATTR
Arran Cudbard-Bell [Thu, 31 Jul 2025 04:22:36 +0000 (21:22 -0700)] 
Fix copying FR_TYPE_ATTR

11 days agoEncoded attributes can be infinitely long, and definitely more than 4 bytes
Arran Cudbard-Bell [Thu, 31 Jul 2025 04:22:23 +0000 (21:22 -0700)] 
Encoded attributes can be infinitely long, and definitely more than 4 bytes

11 days agoNo reason to add 'da' as part of the cursor struct
Arran Cudbard-Bell [Thu, 31 Jul 2025 04:21:47 +0000 (21:21 -0700)] 
No reason to add 'da' as part of the cursor struct

11 days agoCheck for vp_attr in PAIR_VERIFY
Arran Cudbard-Bell [Thu, 31 Jul 2025 04:21:17 +0000 (21:21 -0700)] 
Check for vp_attr in PAIR_VERIFY

11 days agoCan't use verify here, as we're appending half constructed pairs
Arran Cudbard-Bell [Thu, 31 Jul 2025 04:21:03 +0000 (21:21 -0700)] 
Can't use verify here, as we're appending half constructed pairs

11 days agoattr: These conversions are all fine
Arran Cudbard-Bell [Thu, 31 Jul 2025 01:55:05 +0000 (18:55 -0700)] 
attr: These conversions are all fine

12 days agoAdd simplified redundant test
Arran Cudbard-Bell [Wed, 30 Jul 2025 19:51:56 +0000 (12:51 -0700)] 
Add simplified redundant test

12 days agoDon't spit out errors for blastradius
Arran Cudbard-Bell [Wed, 30 Jul 2025 19:51:43 +0000 (12:51 -0700)] 
Don't spit out errors for blastradius

12 days agoAdd test of %rest() receiving a failure HTTP status code
Nick Porter [Wed, 30 Jul 2025 13:15:16 +0000 (14:15 +0100)] 
Add test of %rest() receiving a failure HTTP status code

12 days agoWhen %rest() get a failure HTTP status code capture the body in REST-HTTP-Body
Nick Porter [Wed, 30 Jul 2025 13:03:28 +0000 (14:03 +0100)] 
When %rest() get a failure HTTP status code capture the body in REST-HTTP-Body

Recent correction to rcode handling have resulted in xlats which return
XLAT_ACTION_FAIL having their output disgarded, so the previous
behaviour of %rest() was lost.

This approach gives more consistent behaviour with other xlats, but
still allows access to any errors reported by the server in the reply
body.

13 days agomove DHCPv6 to use FR_TYPE_ATTR
Alan T. DeKok [Tue, 29 Jul 2025 17:11:00 +0000 (13:11 -0400)] 
move DHCPv6 to use FR_TYPE_ATTR

13 days agoparse OIDs numerically if we don't know the name
Alan T. DeKok [Tue, 29 Jul 2025 17:10:32 +0000 (13:10 -0400)] 
parse OIDs numerically if we don't know the name

13 days agodocs-v4: update top-level and sub-section landing pages HIVE 4114/8. Added xrefs...
nolade [Tue, 15 Jul 2025 19:21:52 +0000 (15:21 -0400)] 
docs-v4: update top-level and sub-section landing pages HIVE 4114/8. Added xrefs, rewrote some intros.

13 days agodocs-v4: Update Introduction landing page and nav panel HIVE 4114/5
nolade [Thu, 10 Jul 2025 16:35:44 +0000 (12:35 -0400)] 
docs-v4: Update Introduction landing page and nav panel HIVE 4114/5

13 days agoadded some more guidance
Alan T. DeKok [Tue, 29 Jul 2025 13:42:03 +0000 (09:42 -0400)] 
added some more guidance

13 days agodocs-v4: Fix make docsite errors
nolade [Wed, 16 Jul 2025 20:36:31 +0000 (16:36 -0400)] 
docs-v4: Fix make docsite errors

13 days agoswitch dhcpv4 to use FR_TYPE_ATTR for Parameter-Request-List
Alan T. DeKok [Tue, 29 Jul 2025 13:04:30 +0000 (09:04 -0400)] 
switch dhcpv4 to use FR_TYPE_ATTR for Parameter-Request-List

the underlying data type / length of the encoding is defined by
the size of the attribute number, and not by the dictionaries

13 days agoallow FR_TYPE_ATTR to be passed in as enumv for decoding
Alan T. DeKok [Tue, 29 Jul 2025 13:04:10 +0000 (09:04 -0400)] 
allow FR_TYPE_ATTR to be passed in as enumv for decoding

13 days agodecode FR_TYPE_ATTR
Alan T. DeKok [Tue, 29 Jul 2025 11:53:40 +0000 (07:53 -0400)] 
decode FR_TYPE_ATTR

13 days agoprint full received data on -xx
Alan T. DeKok [Tue, 29 Jul 2025 11:53:19 +0000 (07:53 -0400)] 
print full received data on -xx

13 days agoverify FR_TYPE_ATTR
Alan T. DeKok [Tue, 29 Jul 2025 10:42:57 +0000 (06:42 -0400)] 
verify FR_TYPE_ATTR

13 days agodon't assert if we fail to instantiate the dictionaries
Alan T. DeKok [Tue, 29 Jul 2025 10:36:27 +0000 (06:36 -0400)] 
don't assert if we fail to instantiate the dictionaries

13 days agocleanups and tests
Alan T. DeKok [Tue, 29 Jul 2025 09:38:54 +0000 (05:38 -0400)] 
cleanups and tests

we might as well use "::" for FR_TYPE_ATTR, too.  This makes them
look and feel like enums, rather than adding extra-special syntax

13 days agobe safe when passed a dict root
Alan T. DeKok [Tue, 29 Jul 2025 09:54:42 +0000 (05:54 -0400)] 
be safe when passed a dict root

13 days agoAdd map tests with nested LHS
Nick Porter [Tue, 29 Jul 2025 09:56:51 +0000 (10:56 +0100)] 
Add map tests with nested LHS

13 days agomap_to_request expects the value callback to only create the leaf pair
Nick Porter [Tue, 29 Jul 2025 09:43:05 +0000 (10:43 +0100)] 
map_to_request expects the value callback to only create the leaf pair

It does the job of creating any interim structural pairs required

13 days agodon't call shutdown recursively
Alan T. DeKok [Tue, 29 Jul 2025 09:00:23 +0000 (05:00 -0400)] 
don't call shutdown recursively

13 days agoPacify coverity (CID #1660567)
Nick Porter [Tue, 29 Jul 2025 08:14:18 +0000 (09:14 +0100)] 
Pacify coverity (CID #1660567)

13 days agoRemove libpcre references from docs
Nick Porter [Mon, 28 Jul 2025 16:17:28 +0000 (17:17 +0100)] 
Remove libpcre references from docs

13 days agoRemove feature.regex-pcre from tests
Nick Porter [Mon, 28 Jul 2025 16:14:39 +0000 (17:14 +0100)] 
Remove feature.regex-pcre from tests

13 days agoAll supported platforms have libpcre2 available
Nick Porter [Thu, 24 Jul 2025 17:35:31 +0000 (18:35 +0100)] 
All supported platforms have libpcre2 available

So remove libpcre code

13 days agoAll supported .deb platforms have libpcre2
Nick Porter [Thu, 24 Jul 2025 16:40:01 +0000 (17:40 +0100)] 
All supported .deb platforms have libpcre2

2 weeks agoDon't call fr_bio_shutdown recursively
Arran Cudbard-Bell [Mon, 28 Jul 2025 23:31:17 +0000 (16:31 -0700)] 
Don't call fr_bio_shutdown recursively

2 weeks agoclose and free on shutdown
Alan T. DeKok [Mon, 28 Jul 2025 19:47:51 +0000 (15:47 -0400)] 
close and free on shutdown

2 weeks agoadd FR_TYPE_ATTR
Alan T. DeKok [Mon, 28 Jul 2025 19:44:37 +0000 (15:44 -0400)] 
add FR_TYPE_ATTR

no tests.  will do soon.

2 weeks agono need to check for NULL
Alan T. DeKok [Mon, 28 Jul 2025 12:30:58 +0000 (08:30 -0400)] 
no need to check for NULL

2 weeks agono need to check for NULL
Alan T. DeKok [Mon, 28 Jul 2025 12:29:26 +0000 (08:29 -0400)] 
no need to check for NULL

2 weeks agono need to check for NULL as a special case
Alan T. DeKok [Mon, 28 Jul 2025 12:27:59 +0000 (08:27 -0400)] 
no need to check for NULL as a special case

2 weeks agomight as well allow actions{...} in catch {...}
Alan T. DeKok [Sat, 26 Jul 2025 18:52:08 +0000 (14:52 -0400)] 
might as well allow actions{...} in catch {...}

tho I guess this check should really be a flag in the unlang op
structure.

2 weeks agomight as well save the result somewhere
Alan T. DeKok [Wed, 23 Jul 2025 07:11:05 +0000 (09:11 +0200)] 
might as well save the result somewhere

2 weeks agocatch many many more corner cases with 'try'
Alan T. DeKok [Mon, 28 Jul 2025 00:27:42 +0000 (20:27 -0400)] 
catch many many more corner cases with 'try'

if the input compile_ctx has REJECT or RETURN for an action, AND
there's a "try / catch" for it, we do NOT have the try actions
stay "REJECT" or "RETURN"

also change the behavior so catch { ... } means "catch ALL" of the
rcodes.

the error rcodes are special, too :(

2 weeks agohave "try" cache the "catch" instructions
Alan T. DeKok [Sun, 27 Jul 2025 15:38:38 +0000 (11:38 -0400)] 
have "try" cache the "catch" instructions

and rearrange the code so that we don't have to skip to the next
catch, it just happens automatically in the interpreter

2 weeks agoremove unused macro
Alan T. DeKok [Sun, 27 Jul 2025 16:39:14 +0000 (12:39 -0400)] 
remove unused macro

2 weeks agomore initialization, and catch corner cases
Alan T. DeKok [Sun, 27 Jul 2025 16:07:52 +0000 (12:07 -0400)] 
more initialization, and catch corner cases

2 weeks agomove unlang_t to use dlists
Alan T. DeKok [Sun, 27 Jul 2025 15:06:38 +0000 (11:06 -0400)] 
move unlang_t to use dlists

2 weeks agoremove unused function ulang_timeout_section_push()
Alan T. DeKok [Sun, 27 Jul 2025 11:36:26 +0000 (07:36 -0400)] 
remove unused function ulang_timeout_section_push()

2 weeks agouse section_result to refer to results from push_section()
Alan T. DeKok [Mon, 21 Jul 2025 12:09:31 +0000 (14:09 +0200)] 
use section_result to refer to results from push_section()

2 weeks agouse macro
Alan T. DeKok [Mon, 21 Jul 2025 12:08:57 +0000 (14:08 +0200)] 
use macro

2 weeks agoUse a dummy eap-sim virtual server for the eap_sim module tests
Arran Cudbard-Bell [Fri, 25 Jul 2025 19:45:44 +0000 (12:45 -0700)] 
Use a dummy eap-sim virtual server for the eap_sim module tests

2 weeks agoMerge state machines with EAP modules, use virtual_server_t in more places
Arran Cudbard-Bell [Fri, 25 Jul 2025 19:33:55 +0000 (12:33 -0700)] 
Merge state machines with EAP modules, use virtual_server_t in more places

2 weeks agoRemove unused function
Arran Cudbard-Bell [Fri, 25 Jul 2025 18:31:14 +0000 (11:31 -0700)] 
Remove unused function

2 weeks agoEnsure process modules in virtual servers have a specific name Closes #5626
Arran Cudbard-Bell [Fri, 25 Jul 2025 18:31:05 +0000 (11:31 -0700)] 
Ensure process modules in virtual servers have a specific name Closes #5626

This stops people using the wrong virtual server with EAP modules

2 weeks agoTest use of local variable to reference index in map list
Nick Porter [Thu, 24 Jul 2025 13:57:33 +0000 (14:57 +0100)] 
Test use of local variable to reference index in map list

2 weeks agoDon't dereference output pointer in debug
Nick Porter [Thu, 24 Jul 2025 13:37:52 +0000 (14:37 +0100)] 
Don't dereference output pointer in debug

If `out` points to an integer rather than a char* then dereferencing
does not give another pointer.

2 weeks agoUse a type handled by FR_TYPE_FROM_PTR
Nick Porter [Thu, 24 Jul 2025 12:43:41 +0000 (13:43 +0100)] 
Use a type handled by FR_TYPE_FROM_PTR

2 weeks agoTest handling of FR_TYPE_NULL in map list
Nick Porter [Thu, 24 Jul 2025 11:16:08 +0000 (12:16 +0100)] 
Test handling of FR_TYPE_NULL in map list

2 weeks agoAllow redis xlat to emit FR_TYPE_NULL again
Nick Porter [Thu, 24 Jul 2025 11:15:24 +0000 (12:15 +0100)] 
Allow redis xlat to emit FR_TYPE_NULL again

Now that this can be handled by `map list`

2 weeks agoAdd basic test of map list
Nick Porter [Thu, 24 Jul 2025 11:32:36 +0000 (12:32 +0100)] 
Add basic test of map list

2 weeks agoAdd `map list` as a "builtin" map
Nick Porter [Thu, 24 Jul 2025 10:54:00 +0000 (11:54 +0100)] 
Add `map list` as a "builtin" map

2 weeks agoPacify UBSAN for rlm_tacacs conn_init
Nick Porter [Thu, 24 Jul 2025 10:55:22 +0000 (11:55 +0100)] 
Pacify UBSAN for rlm_tacacs conn_init

2 weeks agoRemove unused prototype
Nick Porter [Thu, 24 Jul 2025 09:50:17 +0000 (10:50 +0100)] 
Remove unused prototype

2 weeks agoUpdate radhttpcheck.py to use pyrad or pyrad2
Nick Porter [Tue, 22 Jul 2025 17:14:57 +0000 (18:14 +0100)] 
Update radhttpcheck.py to use pyrad or pyrad2

pyrad2 is required if the checks are going to be called from Windows,
but it requires Python >= 3.12 so is not suitable for all Linux hosts.

2 weeks agoMap TACACS reply packet code to module rcode
Nick Porter [Tue, 22 Jul 2025 15:01:30 +0000 (16:01 +0100)] 
Map TACACS reply packet code to module rcode