]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Sun, 4 May 2025 00:23:20 +0000 (20:23 -0400)]
notes on "don't use exec, it's slow"
Alan T. DeKok [Sat, 3 May 2025 13:54:26 +0000 (09:54 -0400)]
notes on v4
Alan T. DeKok [Sat, 3 May 2025 12:15:37 +0000 (08:15 -0400)]
add %regex.search()
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
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.
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
Alan T. DeKok [Fri, 2 May 2025 11:23:14 +0000 (07:23 -0400)]
finalize the timer functionality
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
Alan T. DeKok [Fri, 2 May 2025 14:31:49 +0000 (10:31 -0400)]
remove duplicate code
Nick Porter [Fri, 2 May 2025 13:55:08 +0000 (14:55 +0100)]
Python and Lua do support nested attributes now
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.
Alan T. DeKok [Fri, 2 May 2025 10:18:18 +0000 (06:18 -0400)]
update copyright
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
Nick Porter [Fri, 2 May 2025 09:47:49 +0000 (10:47 +0100)]
docs: Add rlm_lua module howto
Nick Porter [Fri, 2 May 2025 09:45:00 +0000 (10:45 +0100)]
Update example.lua
Nick Porter [Fri, 2 May 2025 09:42:03 +0000 (10:42 +0100)]
Update docs from latest raddb
Nick Porter [Fri, 2 May 2025 09:32:55 +0000 (10:32 +0100)]
Add test of attribute deletion 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
Nick Porter [Thu, 1 May 2025 16:19:20 +0000 (17:19 +0100)]
Add tests of attribute access / setting in rlm_lua
Nick Porter [Thu, 1 May 2025 13:03:21 +0000 (14:03 +0100)]
Add function descriptions
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.
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.
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
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.
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
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.
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.
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
Nick Porter [Thu, 1 May 2025 11:21:30 +0000 (12:21 +0100)]
Only call _lua_fr_request_register if there is a request
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
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
Nick Porter [Thu, 1 May 2025 11:00:04 +0000 (12:00 +0100)]
Return a table of child attribute names for structural attributes
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.
Nick Porter [Thu, 1 May 2025 07:50:36 +0000 (08:50 +0100)]
Comment out packet types which don't have a recv section
Nick Porter [Thu, 1 May 2025 17:17:34 +0000 (18:17 +0100)]
Pacify GCC
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.
Arran Cudbard-Bell [Thu, 1 May 2025 20:42:32 +0000 (16:42 -0400)]
Fix typo in stack dump
Arran Cudbard-Bell [Thu, 1 May 2025 18:53:55 +0000 (14:53 -0400)]
Print out continue points in stack debugs
nolade [Thu, 1 May 2025 16:17:55 +0000 (12:17 -0400)]
docs: make docsite build fix. Updated sqlippool links (introduction >> troubleshooting >> datastores)
nolade [Thu, 1 May 2025 18:27:09 +0000 (14:27 -0400)]
docs: make docsite build fix. Update subrequest.adoc with try/catch links.
nolade [Thu, 1 May 2025 19:25:16 +0000 (15:25 -0400)]
docs: make docsite build fix. Updated cache files (table needed end-delimter)
Alan T. DeKok [Thu, 1 May 2025 18:41:02 +0000 (14:41 -0400)]
rename and tweak
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
Arran Cudbard-Bell [Thu, 1 May 2025 18:36:31 +0000 (14:36 -0400)]
Just add a "continue" point flag. It's less code.
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
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
Alan T. DeKok [Thu, 1 May 2025 11:55:44 +0000 (07:55 -0400)]
add support for 'continue'
along with documentation and tests
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
Alan T. DeKok [Thu, 1 May 2025 11:03:48 +0000 (07:03 -0400)]
retry limits return timeout, not fail
Alan T. DeKok [Thu, 1 May 2025 11:01:22 +0000 (07:01 -0400)]
tweak and refer to rcode table
Alan T. DeKok [Thu, 1 May 2025 11:01:17 +0000 (07:01 -0400)]
document timeout rcode
Arran Cudbard-Bell [Wed, 30 Apr 2025 20:24:30 +0000 (16:24 -0400)]
uflags don't unwind anything anymore
Arran Cudbard-Bell [Wed, 30 Apr 2025 19:42:37 +0000 (15:42 -0400)]
Ensure old is initialised in all code paths
Arran Cudbard-Bell [Wed, 30 Apr 2025 19:28:32 +0000 (15:28 -0400)]
Shutup GCC
Arran Cudbard-Bell [Wed, 30 Apr 2025 19:18:03 +0000 (15:18 -0400)]
Make redundant work with "timeout"
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
Arran Cudbard-Bell [Wed, 30 Apr 2025 18:37:13 +0000 (14:37 -0400)]
Check we have a stack as is done elsewhere
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
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
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.
Arran Cudbard-Bell [Wed, 30 Apr 2025 18:13:58 +0000 (14:13 -0400)]
Regression tests for try/catch
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
Arran Cudbard-Bell [Wed, 30 Apr 2025 18:13:00 +0000 (14:13 -0400)]
Log what we're catching
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
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
Arran Cudbard-Bell [Wed, 30 Apr 2025 04:13:01 +0000 (00:13 -0400)]
Remove interpreter stop callback
Simplify use of request master state
Arran Cudbard-Bell [Wed, 30 Apr 2025 04:11:54 +0000 (00:11 -0400)]
frame_pop can pop the top frame too
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
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.
Arran Cudbard-Bell [Tue, 29 Apr 2025 23:10:48 +0000 (19:10 -0400)]
Check alloc
Arran Cudbard-Bell [Tue, 29 Apr 2025 23:10:03 +0000 (19:10 -0400)]
WS
WS
WS
WS
Arran Cudbard-Bell [Tue, 29 Apr 2025 23:08:14 +0000 (19:08 -0400)]
Move unwind frame flags into an enum
Arran Cudbard-Bell [Tue, 29 Apr 2025 23:04:12 +0000 (19:04 -0400)]
s/UNWIND_FLAG/UNWIND_FRAME_FLAG/g
Arran Cudbard-Bell [Tue, 29 Apr 2025 23:01:03 +0000 (19:01 -0400)]
s/unlang_frame_signal/unlang_stack_signal/g
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
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
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.
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.
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!
Alan T. DeKok [Wed, 30 Apr 2025 17:36:01 +0000 (13:36 -0400)]
all listeners must have a 'transport' section
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
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.
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.
Nick Porter [Wed, 30 Apr 2025 11:19:50 +0000 (12:19 +0100)]
Add notes on rlm_python changes to upgrade doc
nolade [Fri, 25 Apr 2025 20:59:37 +0000 (16:59 -0400)]
docs: Reorganized sqlippool section and 1st pass edit on content.
Reorganize SQL-IP-POOL section and xref/link updates
Alan T. DeKok [Tue, 29 Apr 2025 14:46:24 +0000 (10:46 -0400)]
replace %{1} with %regex.match(1)
like some other languages.
The unfortunate outcome is that this makes a lot of things much
more complex visually. But it's a bit more consistent with the
rest of the xlat functions. And, for the v4 way of "less magic
and fewer special cases".
For now, %{1} etc. is still functional
and enable %regex.match() in non-PCRE builds
Alan T. DeKok [Tue, 29 Apr 2025 14:29:18 +0000 (10:29 -0400)]
%regex() -> %regex.match()
nolade [Mon, 28 Apr 2025 21:15:28 +0000 (17:15 -0400)]
doc: import customer docs Recover SQL IP Pools (HIVE 3406)
Alan T. DeKok [Tue, 29 Apr 2025 13:43:18 +0000 (09:43 -0400)]
add test for local variables in subrequest
Nick Porter [Tue, 29 Apr 2025 07:32:26 +0000 (08:32 +0100)]
Allow local variables in subrequests
Alan T. DeKok [Mon, 28 Apr 2025 16:23:04 +0000 (12:23 -0400)]
it helps to update this, too
Alan T. DeKok [Mon, 28 Apr 2025 15:51:27 +0000 (11:51 -0400)]
allow replication to TCP sockets
where we need a trunk, and a new set of callback functions
Alan T. DeKok [Mon, 28 Apr 2025 15:46:50 +0000 (11:46 -0400)]
packet verification is handled in the BIO callbacks
by the rlm_radius_verify() function.
ideally, we should also move any tracking checks and decode
routines to that function, too
Alan T. DeKok [Mon, 28 Apr 2025 12:05:48 +0000 (08:05 -0400)]
don't convert the input key to a string
we're hashing it for load-balance purposes. So we can just hash
the raw data.
and since tmpl_expand() now produces errors, we don't need to
Alan T. DeKok [Mon, 28 Apr 2025 11:57:15 +0000 (07:57 -0400)]
just use fr_value_box_cast() in tmpl_to_type
as it means there are fewer corner cases in the code.
and add RDEBUG messages, so that the caller gets told when things
go wrong.
note that this function is only called from a few places:
tmpl_dcursor, which needs uint8_t
ldap maps, sql maps, attr_filter, and load-balance, which all
need strings.
Alan T. DeKok [Mon, 28 Apr 2025 19:51:35 +0000 (15:51 -0400)]
resolve tmpls before returning them to LDAP
Alan T. DeKok [Mon, 28 Apr 2025 19:27:47 +0000 (15:27 -0400)]
unconnected replication sockets can only be UDP
Nick Porter [Mon, 28 Apr 2025 14:23:00 +0000 (15:23 +0100)]
Add test to proxy detached subrequest
and missing files from rlm_radius originate test
Nick Porter [Mon, 28 Apr 2025 14:07:53 +0000 (15:07 +0100)]
Subrequests are talloc'd not reserved from the slab
Nick Porter [Mon, 28 Apr 2025 12:12:56 +0000 (13:12 +0100)]
Add redis xlat tests
Checking for:
- basic SET / GET
- return of NULL can fall back to an alternate value
- return of multiple values with HMGET