]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
3 weeks agoAdd additional file check flags
Arran Cudbard-Bell [Thu, 17 Jul 2025 02:19:55 +0000 (20:19 -0600)] 
Add additional file check flags

Add specific flag for unix sockets

3 weeks agomust always check the return code of fr_value_box_cast
Alan T. DeKok [Wed, 16 Jul 2025 19:31:30 +0000 (15:31 -0400)] 
must always check the return code of fr_value_box_cast

3 weeks agoadd test of "last loop returns the rcode"
Alan T. DeKok [Wed, 16 Jul 2025 19:21:42 +0000 (15:21 -0400)] 
add test of "last loop returns the rcode"

3 weeks agouse consistent names
Alan T. DeKok [Wed, 16 Jul 2025 11:22:29 +0000 (07:22 -0400)] 
use consistent names

$ git grep -w result_p  | wc -l
      42
$ git grep -w p_result  | wc -l
     860

3 weeks agomove MOD_ACTION_NOT_SET --> 0
Alan T. DeKok [Tue, 15 Jul 2025 18:45:03 +0000 (14:45 -0400)] 
move MOD_ACTION_NOT_SET --> 0

add macros for valid values.  sprinkle assertions throughout the
code.  Move the action names to a fixed-size array.  Update the
printing to print out the names in all cases (not the numbers)

3 weeks agoallow ::enum for 'case' statements
Alan T. DeKok [Wed, 16 Jul 2025 10:40:54 +0000 (06:40 -0400)] 
allow ::enum for 'case' statements

3 weeks agoCorrect docs on rlm_radius return codes
Nick Porter [Wed, 16 Jul 2025 10:23:02 +0000 (11:23 +0100)] 
Correct docs on rlm_radius return codes

3 weeks agocorrect behavior of parallel
Alan T. DeKok [Tue, 15 Jul 2025 15:36:31 +0000 (11:36 -0400)] 
correct behavior of parallel

it helps to actually set p_result when pushing the child.

Then, update the tests to match the documented behavior.

3 weeks agoit helps to track the child result
Alan T. DeKok [Tue, 15 Jul 2025 14:48:14 +0000 (10:48 -0400)] 
it helps to track the child result

3 weeks agouse macros for priorities, not hard-coded numbers
Alan T. DeKok [Tue, 15 Jul 2025 14:47:12 +0000 (10:47 -0400)] 
use macros for priorities, not hard-coded numbers

this helps with transitioning the actual values

3 weeks agogive expr.rcode() a better name: interpreter.rcode()
Alan T. DeKok [Tue, 15 Jul 2025 13:05:10 +0000 (09:05 -0400)] 
give expr.rcode() a better name: interpreter.rcode()

the old one is still around for compatibility reasons

3 weeks agoprint rcode if we don't get passed options
Alan T. DeKok [Tue, 15 Jul 2025 13:04:08 +0000 (09:04 -0400)] 
print rcode if we don't get passed options

3 weeks agoSimplify call_env expanding
Nick Porter [Tue, 15 Jul 2025 12:39:18 +0000 (13:39 +0100)] 
Simplify call_env expanding

Pointers to source tmpls are always set in call_env_expand_start, so
don't need handling in call_env_expand_repeat.

Parse only envs are never pushed as tmpls, so will never be processed in
call_env_expand_repeat.

3 weeks agoIf a tmpl is data, no need to push it for evaluation
Nick Porter [Tue, 15 Jul 2025 11:34:25 +0000 (12:34 +0100)] 
If a tmpl is data, no need to push it for evaluation

4 weeks agouse macro to set p_result
Alan T. DeKok [Tue, 15 Jul 2025 10:23:40 +0000 (06:23 -0400)] 
use macro to set p_result

which lets us initialize the structure with the correct values

4 weeks agoUse netlink API to insert ARP entries on FreeBSD
Nick Porter [Tue, 15 Jul 2025 09:54:19 +0000 (10:54 +0100)] 
Use netlink API to insert ARP entries on FreeBSD

Comparable to how FreeBSD's arp command adds entries using netlink.

4 weeks agoSet the request->rcode to the default section rcode when we enter a section
Arran Cudbard-Bell [Tue, 15 Jul 2025 05:13:07 +0000 (23:13 -0600)] 
Set the request->rcode to the default section rcode when we enter a section

4 weeks agoDefault rcode is now noop
Arran Cudbard-Bell [Tue, 15 Jul 2025 05:12:23 +0000 (23:12 -0600)] 
Default rcode is now noop

4 weeks agoSync up perl return codes with server return codes
Arran Cudbard-Bell [Tue, 15 Jul 2025 05:12:09 +0000 (23:12 -0600)] 
Sync up perl return codes with server return codes

4 weeks agoadd signal.raise("break"), this lets us stop the program after an unlang keyword...
Arran Cudbard-Bell [Tue, 15 Jul 2025 04:16:12 +0000 (22:16 -0600)] 
add signal.raise("break"), this lets us stop the program after an unlang keyword executes, which makes it easier to debug certain issues

4 weeks agoRLM_MODULE_NOT_SET=0 so that zeroed memory is invalid.
Arran Cudbard-Bell [Tue, 15 Jul 2025 05:14:00 +0000 (23:14 -0600)] 
RLM_MODULE_NOT_SET=0 so that zeroed memory is invalid.

4 weeks agouse macro to initialize struct with UNLANG_RESULT_NOT_SET
Alan T. DeKok [Mon, 14 Jul 2025 20:54:57 +0000 (16:54 -0400)] 
use macro to initialize struct with UNLANG_RESULT_NOT_SET

4 weeks agoMake the compound literal part of the macro
Arran Cudbard-Bell [Tue, 15 Jul 2025 03:27:38 +0000 (21:27 -0600)] 
Make the compound literal part of the macro

4 weeks agoThe result of the interpret should be the result_p of the frame not the section_result
Arran Cudbard-Bell [Tue, 15 Jul 2025 02:50:51 +0000 (20:50 -0600)] 
The result of the interpret should be the result_p of the frame not the section_result

This caused synchronous evaluation of xlats to return reject

4 weeks agomove redundant to its own function
Alan T. DeKok [Fri, 11 Jul 2025 23:05:05 +0000 (19:05 -0400)] 
move redundant to its own function

it's not really a group.  Instead, it should share the redundancy
functionality of redundant-load-balance

4 weeks agoRemove unused function
Arran Cudbard-Bell [Tue, 15 Jul 2025 01:14:38 +0000 (19:14 -0600)] 
Remove unused function

4 weeks agorun dsymutil if we have it and libbacktrace
Alan T. DeKok [Mon, 14 Jul 2025 13:29:04 +0000 (09:29 -0400)] 
run dsymutil if we have it and libbacktrace

4 weeks agoThe pid file may reference a process that doesn't exist
Nick Porter [Mon, 14 Jul 2025 08:14:43 +0000 (09:14 +0100)] 
The pid file may reference a process that doesn't exist

4 weeks agoadd p_result to unlang_tmpl_push()
Alan T. DeKok [Thu, 10 Jul 2025 19:35:06 +0000 (15:35 -0400)] 
add p_result to unlang_tmpl_push()

4 weeks agoRegression test for internal encoder
Arran Cudbard-Bell [Mon, 14 Jul 2025 00:22:00 +0000 (18:22 -0600)] 
Regression test for internal encoder

4 weeks agoAdd support for libbacktrace
Arran Cudbard-Bell [Mon, 14 Jul 2025 00:21:41 +0000 (18:21 -0600)] 
Add support for libbacktrace

4 weeks agoAdd utility functions to trim paths
Arran Cudbard-Bell [Mon, 14 Jul 2025 00:16:11 +0000 (18:16 -0600)] 
Add utility functions to trim paths

4 weeks agoDon't pass a pointer to the password value box...
Arran Cudbard-Bell [Mon, 14 Jul 2025 00:14:19 +0000 (18:14 -0600)] 
Don't pass a pointer to the password value box...

4 weeks agoAdd libbacktrace as a submodule
Arran Cudbard-Bell [Mon, 14 Jul 2025 00:14:03 +0000 (18:14 -0600)] 
Add libbacktrace as a submodule

4 weeks agoremove radius_packet_t
Alan T. DeKok [Sun, 13 Jul 2025 15:43:05 +0000 (11:43 -0400)] 
remove radius_packet_t

structs require alignment.  But packets can come from anywhere,
and aren't always aligned.

4 weeks agoregularize pool configuration for tests
Alan T. DeKok [Sun, 13 Jul 2025 12:04:03 +0000 (08:04 -0400)] 
regularize pool configuration for tests

it makes absolutely zero sense to have "uses = 2".  This means
that the connections will get closed in the middle of the unit
tests.

4 weeks agoshow when we hit boundaries
Alan T. DeKok [Sun, 13 Jul 2025 11:56:42 +0000 (07:56 -0400)] 
show when we hit boundaries

so that the poor admin reading the debug output can find out
why the connection was closed

4 weeks agoadd and use automatic re-init on connection failure
Alan T. DeKok [Sat, 12 Jul 2025 12:52:49 +0000 (08:52 -0400)] 
add and use automatic re-init on connection failure

Some SQL modules use a thread-specific connection hamdle for
escaping. However, that connection may fail for some reason.
When that happens, the connection should be reopened.

Otherwise, the connection will go down, and will never come back
up again.

4 weeks agoFix unaligned access in DHCPv4 "get_option" on MacOS
Arran Cudbard-Bell [Sun, 13 Jul 2025 15:15:42 +0000 (09:15 -0600)] 
Fix unaligned access in DHCPv4 "get_option" on MacOS

4 weeks agorework load balance
Alan T. DeKok [Fri, 11 Jul 2025 15:20:18 +0000 (11:20 -0400)] 
rework load balance

it now supports all data types via fr_value_box_hash()

more sanity checks and simplifications

4 weeks agoUpdate docs from raddb
Nick Porter [Fri, 11 Jul 2025 16:47:26 +0000 (17:47 +0100)] 
Update docs from raddb

4 weeks agoWhitespace
Nick Porter [Fri, 11 Jul 2025 16:48:07 +0000 (17:48 +0100)] 
Whitespace

4 weeks agoUpdate section names referenced in sample modules
Nick Porter [Fri, 11 Jul 2025 16:46:01 +0000 (17:46 +0100)] 
Update section names referenced in sample modules

4 weeks agoUpdate sample rest module
Nick Porter [Fri, 11 Jul 2025 16:21:35 +0000 (17:21 +0100)] 
Update sample rest module

4 weeks agoUpdate rlm_rest test config
Nick Porter [Fri, 11 Jul 2025 16:18:13 +0000 (17:18 +0100)] 
Update rlm_rest test config

4 weeks agoUse call_env to detect which sections rlm_rest is called in
Nick Porter [Thu, 10 Jul 2025 15:03:42 +0000 (16:03 +0100)] 
Use call_env to detect which sections rlm_rest is called in

And find conf sections based on the section name where the module is called.

4 weeks agoMake call_env_parse a public function
Nick Porter [Fri, 11 Jul 2025 12:46:04 +0000 (13:46 +0100)] 
Make call_env_parse a public function

So we can use a custom parser to point at a specific CONF_SECTION rather
than having them hard coded in to the parser config.

4 weeks agoadd comments and macros for mod_action
Alan T. DeKok [Fri, 11 Jul 2025 11:48:20 +0000 (07:48 -0400)] 
add comments and macros for mod_action

4 weeks agoadd error message to xlat_redundant when it fails
Alan T. DeKok [Fri, 11 Jul 2025 11:18:19 +0000 (07:18 -0400)] 
add error message to xlat_redundant when it fails

4 weeks agoadd tmpl_dump
Alan T. DeKok [Thu, 10 Jul 2025 16:18:30 +0000 (12:18 -0400)] 
add tmpl_dump

4 weeks agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Thu, 10 Jul 2025 04:33:55 +0000 (04:33 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

4 weeks agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Thu, 10 Jul 2025 04:33:53 +0000 (04:33 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

4 weeks agoScheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar
github-actions[bot] [Thu, 10 Jul 2025 04:33:43 +0000 (04:33 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar

4 weeks agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Thu, 10 Jul 2025 04:33:40 +0000 (04:33 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar

4 weeks agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Thu, 10 Jul 2025 04:33:37 +0000 (04:33 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar

4 weeks agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Thu, 10 Jul 2025 04:33:31 +0000 (04:33 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar

4 weeks agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Thu, 10 Jul 2025 04:32:55 +0000 (04:32 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

4 weeks agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Thu, 10 Jul 2025 04:31:56 +0000 (04:31 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

4 weeks agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Thu, 10 Jul 2025 04:31:47 +0000 (04:31 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar

4 weeks agoCorrect #ifdef wrapped logic
Nick Porter [Wed, 9 Jul 2025 11:41:19 +0000 (12:41 +0100)] 
Correct #ifdef wrapped logic

4 weeks agoIf we send using pcap, use pcap to receive
Nick Porter [Wed, 9 Jul 2025 11:29:20 +0000 (12:29 +0100)] 
If we send using pcap, use pcap to receive

Calling recvfrom() on the pcap fd returns EWOULDBLOCK or EAGAIN

4 weeks agoCorrect UDP checksum calculation
Nick Porter [Wed, 9 Jul 2025 08:35:26 +0000 (09:35 +0100)] 
Correct UDP checksum calculation

4 weeks agoMove variable initialisation (CID #1655307)
Nick Porter [Wed, 9 Jul 2025 06:51:21 +0000 (07:51 +0100)] 
Move variable initialisation (CID #1655307)

4 weeks agoCorrect return value for comparison (CID #1655308)
Nick Porter [Wed, 9 Jul 2025 06:41:24 +0000 (07:41 +0100)] 
Correct return value for comparison (CID #1655308)

4 weeks agoAdd libpcap option for sending DHCP replies
Nick Porter [Tue, 8 Jul 2025 17:18:29 +0000 (18:18 +0100)] 
Add libpcap option for sending DHCP replies

Which will be used on non-Linux systems.

Also, can be used on Linux for testing, using the hidden listener conf
option of use_pcap

4 weeks agoNo need for dhcp_packet_t
Nick Porter [Tue, 8 Jul 2025 16:14:31 +0000 (17:14 +0100)] 
No need for dhcp_packet_t

Since we're just sending data - not decoding the header.
Using dhcp_packet_t also can cause spurious alignment complaints from
sanitizers.

5 weeks agolet's take the result back up the stack
Alan T. DeKok [Mon, 7 Jul 2025 16:07:18 +0000 (12:07 -0400)] 
let's take the result back up the stack

5 weeks agobetter debug output and clarifications
Alan T. DeKok [Mon, 7 Jul 2025 16:01:24 +0000 (12:01 -0400)] 
better debug output and clarifications

5 weeks agoUse module name in custom call_env_parse functions
Nick Porter [Mon, 7 Jul 2025 15:12:53 +0000 (16:12 +0100)] 
Use module name in custom call_env_parse functions

So call_env_parse() can be made public

5 weeks agoAdd checks that tmpl expansion created a value
Nick Porter [Mon, 7 Jul 2025 15:03:47 +0000 (16:03 +0100)] 
Add checks that tmpl expansion created a value

5 weeks agoIf the query tmpl did not expand, fail the module call
Nick Porter [Mon, 7 Jul 2025 13:38:43 +0000 (14:38 +0100)] 
If the query tmpl did not expand, fail the module call

5 weeks agoMore consistent handling of dcursors in xlat args
Nick Porter [Mon, 7 Jul 2025 08:24:00 +0000 (09:24 +0100)] 
More consistent handling of dcursors in xlat args

xlat_frame_eval doesn't know if the arg is required, so if no pairs are
matched, allow a cursor to be returned.
Then xlat_process_arg_list can do the right thing depending on whether
the argument is required or not.

5 weeks agoSpelling
Nick Porter [Thu, 3 Jul 2025 07:43:51 +0000 (08:43 +0100)] 
Spelling

5 weeks agoit turns out that we care if the xlat fails
Alan T. DeKok [Sun, 6 Jul 2025 16:07:01 +0000 (12:07 -0400)] 
it turns out that we care if the xlat fails

so we return an error when that happens

5 weeks agoquery must exist
Alan T. DeKok [Sun, 6 Jul 2025 13:38:01 +0000 (09:38 -0400)] 
query must exist

otherwise it means that one of the expansions failed, and the
interpreter did not pop the stack.  Instead, it just kept going

5 weeks agofailed cast is fail, not OK
Alan T. DeKok [Sun, 6 Jul 2025 13:26:23 +0000 (09:26 -0400)] 
failed cast is fail, not OK

5 weeks agodocs: Add guidelines for documentation for contributors, coders, and me. Update Termi...
nolade [Tue, 6 May 2025 16:03:00 +0000 (12:03 -0400)] 
docs: Add guidelines for documentation for contributors, coders, and me. Update Terminolgy.adoc standardizing on UK/British spelling. Update accessibility section & included more details in other sections.

5 weeks agoAdded documentation for trigger_exec
ewelsh-inkbridge [Tue, 1 Jul 2025 19:35:04 +0000 (15:35 -0400)] 
Added documentation for trigger_exec

5 weeks agoupdate docs for parallel for intended behavior
Alan T. DeKok [Fri, 4 Jul 2025 14:11:06 +0000 (10:11 -0400)] 
update docs for parallel for intended behavior

5 weeks agohoist "set default actions"
Alan T. DeKok [Thu, 3 Jul 2025 19:22:53 +0000 (15:22 -0400)] 
hoist "set default actions"

so that it's done in only one place

and then since we're cleaning things up, do a bit more work
on unlang_compile_children()

5 weeks agounlang_register() no longer needs a type argument
Alan T. DeKok [Thu, 3 Jul 2025 19:02:37 +0000 (15:02 -0400)] 
unlang_register() no longer needs a type argument

the type is now in the unlang_op_t.  And even that will be removed.

also reformat for consistency.

and add unlang_t size and name for each instruction

5 weeks agoremove debugging
Alan T. DeKok [Fri, 4 Jul 2025 15:20:26 +0000 (11:20 -0400)] 
remove debugging

5 weeks agomove keyword compile_foo() to foo.c
Alan T. DeKok [Thu, 3 Jul 2025 17:24:30 +0000 (13:24 -0400)] 
move keyword compile_foo() to foo.c

mostly. compile_edit(), compile_tmpl(), compile_module(), and
compile_function() are still in compile.c

Many helper functions are exported in interpret_priv.h.  Some of
those should be cleaned up / renamed / un-exported.

The function names could likely be cleaned up.  Much of the code
uses unlang_foo() for private functions.  It should arguably use
private function names.

The unlang_register() function takes a type as both a function
argument, and as a field in unlang_op_t.  Fixing that will require
changing instruction->type to instruction->op in the interpreter,
which should be a next step.

The hash function is just fr_hash().  We should arguably come up
with a perfect hash for the keywords, which will help simplify
the lookups.

5 weeks agopoint to correct function
Alan T. DeKok [Thu, 3 Jul 2025 17:18:20 +0000 (13:18 -0400)] 
point to correct function

5 weeks agolink in "next"
Alan T. DeKok [Thu, 3 Jul 2025 15:57:11 +0000 (11:57 -0400)] 
link in "next"

5 weeks agoUpdate and format. Manual merge of #5618
Alan T. DeKok [Wed, 2 Jul 2025 18:19:13 +0000 (14:19 -0400)] 
Update and format.  Manual merge of #5618

5 weeks agonotes on multiple return codes
Alan T. DeKok [Wed, 2 Jul 2025 18:15:49 +0000 (14:15 -0400)] 
notes on multiple return codes

5 weeks agomore trigger fixes.
Alan T. DeKok [Tue, 1 Jul 2025 21:39:46 +0000 (17:39 -0400)] 
more trigger fixes.

allow back-ticks for exec, and run the exec tmpl type

5 weeks agoallocate a main loop, so that triggers can use it
Alan T. DeKok [Wed, 2 Jul 2025 11:52:01 +0000 (07:52 -0400)] 
allocate a main loop, so that triggers can use it

5 weeks agoassert when we enter the tokenize function, not later
Alan T. DeKok [Wed, 2 Jul 2025 11:48:35 +0000 (07:48 -0400)] 
assert when we enter the tokenize function, not later

when we call xlat_finalize().  This helps to hoist errors earlier
in the call flow.

5 weeks ago"frame" is not talloc'd
Alan T. DeKok [Wed, 2 Jul 2025 11:48:22 +0000 (07:48 -0400)] 
"frame" is not talloc'd

5 weeks agoTMPL_TYPE_EXEC can have xlats, too
Alan T. DeKok [Tue, 1 Jul 2025 21:04:11 +0000 (17:04 -0400)] 
TMPL_TYPE_EXEC can have xlats, too

5 weeks agouse the local thread interpreter here, too
Alan T. DeKok [Tue, 1 Jul 2025 18:41:18 +0000 (14:41 -0400)] 
use the local thread interpreter here, too

5 weeks agoAdd note on SQLite WAL
Nick Porter [Wed, 2 Jul 2025 09:50:34 +0000 (10:50 +0100)] 
Add note on SQLite WAL

5 weeks agoOnly the top level bio needs to be shut down
Nick Porter [Wed, 2 Jul 2025 09:33:52 +0000 (10:33 +0100)] 
Only the top level bio needs to be shut down

5 weeks agoEnsure request is runnable after error
Nick Porter [Wed, 2 Jul 2025 08:56:29 +0000 (09:56 +0100)] 
Ensure request is runnable after error

5 weeks agoAvoid producing stateful cache entries when TLS 1.3 is negotiated
Nick Porter [Tue, 1 Jul 2025 16:58:32 +0000 (17:58 +0100)] 
Avoid producing stateful cache entries when TLS 1.3 is negotiated

5 weeks agoallow xlats in triggers, and update tests to match
Alan T. DeKok [Tue, 1 Jul 2025 16:55:17 +0000 (12:55 -0400)] 
allow xlats in triggers, and update tests to match

5 weeks agoSimplify configuration of EPEL / CRB
Nick Porter [Tue, 1 Jul 2025 16:32:00 +0000 (17:32 +0100)] 
Simplify configuration of EPEL / CRB

PowerTools was the pre-RHEL 9 repo name

5 weeks agoShutdown bios when closing the connection
Nick Porter [Tue, 1 Jul 2025 16:30:38 +0000 (17:30 +0100)] 
Shutdown bios when closing the connection