]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
13 months agobetter handle connected UDP sockets
Alan T. DeKok [Tue, 6 May 2025 15:29:16 +0000 (11:29 -0400)] 
better handle connected UDP sockets

and forbid reuse_port when we have connected UDP sockets, AND
the local IP is a wildcard.  The kernel will send replies to a
random socket, and not to the correct one!

In order to do "connected" UDP sockets with a local wildcard IP,
we will need to use recvfromto(), and then manually direct the
packets to the correct destination socket.

This also means that an "accept" socket will be needed, even for
UDP.  And, the "accept" socket will need to have a list of child
sockets.

13 months agoadd fr_sockaddr_cmp()
Alan T. DeKok [Tue, 6 May 2025 14:23:56 +0000 (10:23 -0400)] 
add fr_sockaddr_cmp()

13 months agouse consistent variable types and names for CMP() checks
Alan T. DeKok [Tue, 6 May 2025 13:20:53 +0000 (09:20 -0400)] 
use consistent variable types and names for CMP() checks

13 months agotry a little more to make 'listen' names unique
Alan T. DeKok [Tue, 6 May 2025 13:03:21 +0000 (09:03 -0400)] 
try a little more to make 'listen' names unique

and give better error messages where we can

13 months agodocs: add guidelines for documentation for contributers, coders, and me.
nolade [Tue, 6 May 2025 16:03:00 +0000 (12:03 -0400)] 
docs: add guidelines for documentation for contributers, coders, and me.

13 months agoRemove errant policy
Nick Porter [Tue, 6 May 2025 12:43:54 +0000 (13:43 +0100)] 
Remove errant policy

13 months agoadd "finally"
Alan T. DeKok [Tue, 6 May 2025 10:22:25 +0000 (06:22 -0400)] 
add "finally"

13 months agoCast constants to float for correct comparison
Nick Porter [Tue, 6 May 2025 09:34:52 +0000 (10:34 +0100)] 
Cast constants to float for correct comparison

13 months agoMake the TLS session ID available in `establish session`
Nick Porter [Mon, 5 May 2025 16:39:36 +0000 (17:39 +0100)] 
Make the TLS session ID available in `establish session`

13 months agoCall `new session` if configured when starting TLS for TTLS
Nick Porter [Mon, 5 May 2025 11:06:34 +0000 (12:06 +0100)] 
Call `new session` if configured when starting TLS for TTLS

13 months agoAdd attribute to record certificate chain depth
Nick Porter [Mon, 5 May 2025 11:05:48 +0000 (12:05 +0100)] 
Add attribute to record certificate chain depth

13 months agoCall `new session` if configured when starting TLS session for PEAP
Nick Porter [Mon, 5 May 2025 08:54:36 +0000 (09:54 +0100)] 
Call `new session` if configured when starting TLS session for PEAP

13 months agoInclude nested password parent name in warning
Nick Porter [Mon, 5 May 2025 07:55:26 +0000 (08:55 +0100)] 
Include nested password parent name in warning

To avoid confusing users

13 months agolet's just commit the generated files, too
Alan T. DeKok [Sun, 4 May 2025 13:19:47 +0000 (09:19 -0400)] 
let's just commit the generated files, too

so that the rpm build phase doesn't need asciidoctor

13 months agogenerate dictionary "man" page from Antora
Alan T. DeKok [Sun, 4 May 2025 13:12:10 +0000 (09:12 -0400)] 
generate dictionary "man" page from Antora

13 months agonew "man unlang" page and cleanups
Alan T. DeKok [Sun, 4 May 2025 12:50:25 +0000 (08:50 -0400)] 
new "man unlang" page and cleanups

which is for now just a paragraph header, and then includes
the "keywords.adoc" file.  The goal here is to provide a simple
offline reference, and not a complete documentation of the server

13 months agoremove "man unlang" and references to it.
Alan T. DeKok [Sun, 4 May 2025 12:25:02 +0000 (08:25 -0400)] 
remove "man unlang" and references to it.

The file is out of date, and has little more than automatic
changes made for a while.  We will replace it with a file that
is generated from asciidoc, and which lives inside of antora

13 months agonotes on "don't use exec, it's slow"
Alan T. DeKok [Sun, 4 May 2025 00:23:20 +0000 (20:23 -0400)] 
notes on "don't use exec, it's slow"

13 months agonotes on v4
Alan T. DeKok [Sat, 3 May 2025 13:54:26 +0000 (09:54 -0400)] 
notes on v4

13 months agoadd %regex.search()
Alan T. DeKok [Sat, 3 May 2025 12:15:37 +0000 (08:15 -0400)] 
add %regex.search()

13 months agoSet start = 0 in SQLite test
Nick Porter [Fri, 2 May 2025 19:28:48 +0000 (20:28 +0100)] 
Set start = 0 in SQLite test

To verify correct behaviour when initial query launches connection

13 months agoSQLite queries which start in backlog will yield - so resume
Nick Porter [Fri, 2 May 2025 17:00:41 +0000 (18:00 +0100)] 
SQLite queries which start in backlog will yield - so resume

Setting `start = 0` in the database pool, causes the first query to go
into a backlog while the connection opens.

Without resuming the request, connections keep spawning and the request
never completes.

13 months agouse the new timer functions
Alan T. DeKok [Fri, 2 May 2025 16:56:54 +0000 (12:56 -0400)] 
use the new timer functions

which makes the retry code significantly simpler

13 months agofinalize the timer functionality
Alan T. DeKok [Fri, 2 May 2025 11:23:14 +0000 (07:23 -0400)] 
finalize the timer functionality

13 months agodon't assert i!prev
Alan T. DeKok [Fri, 2 May 2025 15:25:25 +0000 (11:25 -0400)] 
don't assert i!prev

the next bit of code actually checks for prev

13 months agoremove duplicate code
Alan T. DeKok [Fri, 2 May 2025 14:31:49 +0000 (10:31 -0400)] 
remove duplicate code

13 months agoPython and Lua do support nested attributes now
Nick Porter [Fri, 2 May 2025 13:55:08 +0000 (14:55 +0100)] 
Python and Lua do support nested attributes now

13 months agoadd shared timer lists, which only insert a uctx
Alan T. DeKok [Thu, 1 May 2025 20:39:27 +0000 (16:39 -0400)] 
add shared timer lists, which only insert a uctx

some timer lists contain a large amount of entries, but also
all share the same callback.  Instead of allocating tons of
memory for each fr_timer_event_t, we just allocate a special list,
where every event shares one fr_timer_event_t in the parent.

13 months agoupdate copyright
Alan T. DeKok [Fri, 2 May 2025 10:18:18 +0000 (06:18 -0400)] 
update copyright

13 months agouse fr_cmp_t, instead of fr_lst_cmp_t, as they are the same
Alan T. DeKok [Thu, 1 May 2025 20:24:37 +0000 (16:24 -0400)] 
use fr_cmp_t, instead of fr_lst_cmp_t, as they are the same

13 months agodocs: Add rlm_lua module howto
Nick Porter [Fri, 2 May 2025 09:47:49 +0000 (10:47 +0100)] 
docs: Add rlm_lua module howto

13 months agoUpdate example.lua
Nick Porter [Fri, 2 May 2025 09:45:00 +0000 (10:45 +0100)] 
Update example.lua

13 months agoUpdate docs from latest raddb
Nick Porter [Fri, 2 May 2025 09:42:03 +0000 (10:42 +0100)] 
Update docs from latest raddb

13 months agoAdd test of attribute deletion from rlm_lua
Nick Porter [Fri, 2 May 2025 09:32:55 +0000 (10:32 +0100)] 
Add test of attribute deletion from rlm_lua

13 months agoAdd tests of invalid attribute setting from rlm_lua
Nick Porter [Thu, 1 May 2025 16:47:45 +0000 (17:47 +0100)] 
Add tests of invalid attribute setting from rlm_lua

13 months agoAdd tests of attribute access / setting in rlm_lua
Nick Porter [Thu, 1 May 2025 16:19:20 +0000 (17:19 +0100)] 
Add tests of attribute access / setting in rlm_lua

13 months agoAdd function descriptions
Nick Porter [Thu, 1 May 2025 13:03:21 +0000 (14:03 +0100)] 
Add function descriptions

13 months agoUpdate _lua_list_iterator_init to use fr_lua_pair_t userdata
Nick Porter [Thu, 1 May 2025 12:56:08 +0000 (13:56 +0100)] 
Update _lua_list_iterator_init to use fr_lua_pair_t userdata

So the iterator can work over any list.

13 months agoTidy up _lua_pair_iterator
Nick Porter [Thu, 1 May 2025 12:48:53 +0000 (13:48 +0100)] 
Tidy up _lua_pair_iterator

and make it return the first attribute instance correctly.

13 months agoFix _lua_pair_iterator_init() to use fr_lua_pair_t as userdata
Nick Porter [Thu, 1 May 2025 12:47:35 +0000 (13:47 +0100)] 
Fix _lua_pair_iterator_init() to use fr_lua_pair_t as userdata

13 months agoAdd _lua_pair_setter
Nick Porter [Thu, 1 May 2025 12:40:00 +0000 (13:40 +0100)] 
Add _lua_pair_setter

Used as the __newindex metafunction for all pair tables.

This allows sanity checking so that setting is only valid when doing so
on a specific instnace of a leaf pair.

When amending an existing pair, only its value is changed so that
pointers to the pair remain consistent.

13 months agoAdd fr_lua_parent_build
Nick Porter [Thu, 1 May 2025 12:33:58 +0000 (13:33 +0100)] 
Add fr_lua_parent_build

To build out parent attributes when setting a leaf whose parents don't
exist

13 months agoChange fr_lua_unmarshal to just populate a box
Nick Porter [Thu, 1 May 2025 12:29:30 +0000 (13:29 +0100)] 
Change fr_lua_unmarshal to just populate a box

To avoid allocating a new pair and replacing it in the list when
updating existing pairs.

13 months agoUse a common accessor for pair and pair instance
Nick Porter [Thu, 1 May 2025 12:05:01 +0000 (13:05 +0100)] 
Use a common accessor for pair and pair instance

Which simplifies allowing for `fr.request['foo']['bar'][1]` rather than
`fr.request['foo'][1]['bar'][1]`

The type of the requested index can be used to determine what is
happening.

13 months agoUse _lua_pair_init to add all the lists to the fr table
Nick Porter [Thu, 1 May 2025 11:24:14 +0000 (12:24 +0100)] 
Use _lua_pair_init to add all the lists to the fr table

13 months agoOnly call _lua_fr_request_register if there is a request
Nick Porter [Thu, 1 May 2025 11:21:30 +0000 (12:21 +0100)] 
Only call _lua_fr_request_register if there is a request

13 months agoDefine _lua_pair_init()
Nick Porter [Thu, 1 May 2025 11:19:32 +0000 (12:19 +0100)] 
Define _lua_pair_init()

To create a lua table representing a pair

13 months agoDefine a fr_lua_pair_t
Nick Porter [Thu, 1 May 2025 11:10:59 +0000 (12:10 +0100)] 
Define a fr_lua_pair_t

To use as userdata for accessing / setting pairs using lua

13 months agoReturn a table of child attribute names for structural attributes
Nick Porter [Thu, 1 May 2025 11:00:04 +0000 (12:00 +0100)] 
Return a table of child attribute names for structural attributes

13 months agoRemove unused dcursor
Nick Porter [Thu, 1 May 2025 10:53:59 +0000 (11:53 +0100)] 
Remove unused dcursor

The iterator init allocates the cursor which is actually used.

13 months agoComment out packet types which don't have a recv section
Nick Porter [Thu, 1 May 2025 07:50:36 +0000 (08:50 +0100)] 
Comment out packet types which don't have a recv section

13 months agoPacify GCC
Nick Porter [Thu, 1 May 2025 17:17:34 +0000 (18:17 +0100)] 
Pacify GCC

13 months agoMake behaviour consistent so that we _always_ pop top frames
Arran Cudbard-Bell [Thu, 1 May 2025 20:43:32 +0000 (16:43 -0400)] 
Make behaviour consistent so that we _always_ pop top frames

Previously we weren't and this was causing repeat and signal callbacks to be skipped.  It was also meaning request_done wasn't being called.

13 months agoFix typo in stack dump
Arran Cudbard-Bell [Thu, 1 May 2025 20:42:32 +0000 (16:42 -0400)] 
Fix typo in stack dump

13 months agoPrint out continue points in stack debugs
Arran Cudbard-Bell [Thu, 1 May 2025 18:53:55 +0000 (14:53 -0400)] 
Print out continue points in stack debugs

13 months agodocs: make docsite build fix. Updated sqlippool links (introduction >> troubleshootin...
nolade [Thu, 1 May 2025 16:17:55 +0000 (12:17 -0400)] 
docs: make docsite build fix. Updated sqlippool links (introduction >> troubleshooting >> datastores)

13 months agodocs: make docsite build fix. Update subrequest.adoc with try/catch links.
nolade [Thu, 1 May 2025 18:27:09 +0000 (14:27 -0400)] 
docs: make docsite build fix. Update subrequest.adoc with try/catch links.

13 months agodocs: make docsite build fix. Updated cache files (table needed end-delimter)
nolade [Thu, 1 May 2025 19:25:16 +0000 (15:25 -0400)] 
docs: make docsite build fix. Updated cache files (table needed end-delimter)

13 months agorename and tweak
Alan T. DeKok [Thu, 1 May 2025 18:41:02 +0000 (14:41 -0400)] 
rename and tweak

13 months agodocs: Add raduat tool info to Antora repo
nolade [Tue, 29 Apr 2025 21:19:29 +0000 (17:19 -0400)] 
docs: Add raduat tool info to Antora repo

docs: import raduat information from wiki, salt repo, and raduat script

13 months agoJust add a "continue" point flag. It's less code.
Arran Cudbard-Bell [Thu, 1 May 2025 18:36:31 +0000 (14:36 -0400)] 
Just add a "continue" point flag.  It's less code.

13 months agouse less memory. Don't allocate struct and then over-write it
Alan T. DeKok [Thu, 1 May 2025 16:05:30 +0000 (12:05 -0400)] 
use less memory.  Don't allocate struct and then over-write it

13 months agoadd / update list disarm / arm, which is only for sub-lists
Alan T. DeKok [Thu, 1 May 2025 14:55:33 +0000 (10:55 -0400)] 
add / update list disarm / arm, which is only for sub-lists

when a list is disarmed, its events aren't run.  Events can still
be added to it.  But because its event has been removed from the
parent timer, no events will ever run.

when a list is re-armed, it runs all events which have been
pending during the disarm period.  The caller is likely to clean
up events before re-arming the list

13 months agoadd support for 'continue'
Alan T. DeKok [Thu, 1 May 2025 11:55:44 +0000 (07:55 -0400)] 
add support for 'continue'

along with documentation and tests

13 months agoallow "break" inside of "case"
Alan T. DeKok [Thu, 1 May 2025 11:19:44 +0000 (07:19 -0400)] 
allow "break" inside of "case"

and "switch" is then marked as the break point.

Also update the "break" checks to use the flags instead of
unlang types

13 months agoretry limits return timeout, not fail
Alan T. DeKok [Thu, 1 May 2025 11:03:48 +0000 (07:03 -0400)] 
retry limits return timeout, not fail

13 months agotweak and refer to rcode table
Alan T. DeKok [Thu, 1 May 2025 11:01:22 +0000 (07:01 -0400)] 
tweak and refer to rcode table

13 months agodocument timeout rcode
Alan T. DeKok [Thu, 1 May 2025 11:01:17 +0000 (07:01 -0400)] 
document timeout rcode

13 months agouflags don't unwind anything anymore
Arran Cudbard-Bell [Wed, 30 Apr 2025 20:24:30 +0000 (16:24 -0400)] 
uflags don't unwind anything anymore

13 months agoEnsure old is initialised in all code paths
Arran Cudbard-Bell [Wed, 30 Apr 2025 19:42:37 +0000 (15:42 -0400)] 
Ensure old is initialised in all code paths

13 months agoShutup GCC
Arran Cudbard-Bell [Wed, 30 Apr 2025 19:28:32 +0000 (15:28 -0400)] 
Shutup GCC

13 months agoMake redundant work with "timeout"
Arran Cudbard-Bell [Wed, 30 Apr 2025 19:18:03 +0000 (15:18 -0400)] 
Make redundant work with "timeout"

13 months agoInitialise break/return depth to a frame deeper than the current one in the stack...
Arran Cudbard-Bell [Wed, 30 Apr 2025 18:37:42 +0000 (14:37 -0400)] 
Initialise break/return depth to a frame deeper than the current one in the stack if we're not actually breaking or returning

13 months agoCheck we have a stack as is done elsewhere
Arran Cudbard-Bell [Wed, 30 Apr 2025 18:37:13 +0000 (14:37 -0400)] 
Check we have a stack as is done elsewhere

13 months agoUpdate docs for timeout/catch
Arran Cudbard-Bell [Wed, 30 Apr 2025 18:28:19 +0000 (14:28 -0400)] 
Update docs for timeout/catch

Mostly removing evidence of its previous existence

13 months agoLack of siblings to catch sections should not trigger an assert
Arran Cudbard-Bell [Wed, 30 Apr 2025 18:16:03 +0000 (14:16 -0400)] 
Lack of siblings to catch sections should not trigger an assert

Lack of catch section should not trigger a warning

13 months agoRemove timeout { ... } catch { ... } and add support for timeout rcodes
Arran Cudbard-Bell [Wed, 30 Apr 2025 18:15:26 +0000 (14:15 -0400)] 
Remove timeout { ... } catch { ... }  and add support for timeout rcodes

timeout { ... }  now sets a timeout rcode that can be caught like any other code.

13 months agoRegression tests for try/catch
Arran Cudbard-Bell [Wed, 30 Apr 2025 18:13:58 +0000 (14:13 -0400)] 
Regression tests for try/catch

13 months agoMove success out of the catch section, this ensure execution continues
Arran Cudbard-Bell [Wed, 30 Apr 2025 18:13:24 +0000 (14:13 -0400)] 
Move success out of the catch section, this ensure execution continues

13 months agoLog what we're catching
Arran Cudbard-Bell [Wed, 30 Apr 2025 18:13:00 +0000 (14:13 -0400)] 
Log what we're catching

13 months agoIf we pass a NULL next to frame_set_next, just return calculate result, and NULLify...
Arran Cudbard-Bell [Wed, 30 Apr 2025 18:12:11 +0000 (14:12 -0400)] 
If we pass a NULL next to frame_set_next, just return calculate result, and NULLify the frame->next pointer

13 months agoAdd a timeout rcode
Arran Cudbard-Bell [Wed, 30 Apr 2025 18:11:42 +0000 (14:11 -0400)] 
Add a timeout rcode

This causes process modules to not respond to requests

13 months agoRemove interpreter stop callback
Arran Cudbard-Bell [Wed, 30 Apr 2025 04:13:01 +0000 (00:13 -0400)] 
Remove interpreter stop callback

Simplify use of request master state

13 months agoframe_pop can pop the top frame too
Arran Cudbard-Bell [Wed, 30 Apr 2025 04:11:54 +0000 (00:11 -0400)] 
frame_pop can pop the top frame too

13 months agoWe don't need to set the result when we're cancelling the request
Arran Cudbard-Bell [Tue, 29 Apr 2025 23:51:36 +0000 (19:51 -0400)] 
We don't need to set the result when we're cancelling the request

13 months agoMove to synchronous stack unwinding on cancellation
Arran Cudbard-Bell [Tue, 29 Apr 2025 23:15:59 +0000 (19:15 -0400)] 
Move to synchronous stack unwinding on cancellation

Don't set break and return points in stack frames, represent them as intrinsic properties of operations.

Add "op" flags for brackets, set rcode, return point and break point.

13 months agoCheck alloc
Arran Cudbard-Bell [Tue, 29 Apr 2025 23:10:48 +0000 (19:10 -0400)] 
Check alloc

13 months agoWS
Arran Cudbard-Bell [Tue, 29 Apr 2025 23:10:03 +0000 (19:10 -0400)] 
WS

WS

WS

WS

13 months agoMove unwind frame flags into an enum
Arran Cudbard-Bell [Tue, 29 Apr 2025 23:08:14 +0000 (19:08 -0400)] 
Move unwind frame flags into an enum

13 months agos/UNWIND_FLAG/UNWIND_FRAME_FLAG/g
Arran Cudbard-Bell [Tue, 29 Apr 2025 23:04:12 +0000 (19:04 -0400)] 
s/UNWIND_FLAG/UNWIND_FRAME_FLAG/g

13 months agos/unlang_frame_signal/unlang_stack_signal/g
Arran Cudbard-Bell [Tue, 29 Apr 2025 23:01:03 +0000 (19:01 -0400)] 
s/unlang_frame_signal/unlang_stack_signal/g

13 months agoDon't need to set fields to false for unlang ops
Arran Cudbard-Bell [Tue, 29 Apr 2025 22:56:07 +0000 (18:56 -0400)] 
Don't need to set fields to false for unlang ops

13 months agoshut up compiler
Alan T. DeKok [Wed, 30 Apr 2025 19:29:55 +0000 (15:29 -0400)] 
shut up compiler

it's too dumb to see that to_cast is initialized on all paths

13 months agorename "proto = detail" to "handler = detail"
Alan T. DeKok [Wed, 30 Apr 2025 19:05:41 +0000 (15:05 -0400)] 
rename "proto = detail" to "handler = detail"

"proto" is still accepted for compatibility.

However, it was too generic / conflicting, and was therefore
confusing.

Similarly, there were comments saying "listen load" would use
name2 to open the "load" module.  But name2 is now used for
something else, and the code was deleted a long time ago.

13 months agocomplain when no 'send foo' section is found for reply 'foo'
Alan T. DeKok [Wed, 30 Apr 2025 18:21:42 +0000 (14:21 -0400)] 
complain when no 'send foo' section is found for reply 'foo'

However, this is not a fatal error.  Arguably, it should be a
compile-time error and not a run-time error.  But it's hard to
automatically correlate 'recv foo' with 'send reply-to-foo' as
there can be many different kinds of replies.

Having it a run-time error also means that the admin gets warned
on every packet, which means that they are slightly more likely
to read it and then do something about it.

13 months agoevery 'type = foo' also requires a 'recv foo'
Alan T. DeKok [Wed, 30 Apr 2025 18:04:30 +0000 (14:04 -0400)] 
every 'type = foo' also requires a 'recv foo'

otherwise the server won't be able to process packets!

13 months agoall listeners must have a 'transport' section
Alan T. DeKok [Wed, 30 Apr 2025 17:36:01 +0000 (13:36 -0400)] 
all listeners must have a 'transport' section

13 months agoevery listener MUST have an "open" call
Alan T. DeKok [Wed, 30 Apr 2025 17:30:08 +0000 (13:30 -0400)] 
every listener MUST have an "open" call

as a development requirement

13 months agorefuse to start when no 'listen' sections are configured.
Alan T. DeKok [Wed, 30 Apr 2025 17:12:11 +0000 (13:12 -0400)] 
refuse to start when no 'listen' sections are configured.

It helps to fail with a descriptive error, rather than silently
doing the wrong thing.

13 months agoIgnore packaging system upgrade produced config files
Nick Porter [Wed, 30 Apr 2025 13:47:28 +0000 (14:47 +0100)] 
Ignore packaging system upgrade produced config files

Both deb and rpm packaging systems will detect changed config files and
create extra files, which if we load them will create conflicts.