]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agolog: Fix repetition check
Arran Cudbard-Bell [Sat, 11 Apr 2020 05:21:43 +0000 (00:21 -0500)] 
log: Fix repetition check

6 years agorlm_radius: Free packets before retransmission
Arran Cudbard-Bell [Sat, 11 Apr 2020 05:11:14 +0000 (00:11 -0500)] 
rlm_radius: Free packets before retransmission

6 years agoradius_udp: Simplify cancellation function
Arran Cudbard-Bell [Sat, 11 Apr 2020 01:01:00 +0000 (20:01 -0500)] 
radius_udp: Simplify cancellation function

6 years agotrunk: More documentation
Arran Cudbard-Bell [Sat, 11 Apr 2020 01:00:41 +0000 (20:00 -0500)] 
trunk: More documentation

6 years agotest: lets test the 'radsniff -a' (#3367)
Jorge Pereira [Sat, 11 Apr 2020 00:43:55 +0000 (21:43 -0300)] 
test: lets test the 'radsniff -a' (#3367)

It will prevent to detect issues with pcap.c API used to fetch and list
all network interfaces.

6 years agorlm_radius: Add conn_release callback and cleanup release logic
Arran Cudbard-Bell [Fri, 10 Apr 2020 23:28:49 +0000 (18:28 -0500)] 
rlm_radius: Add conn_release callback and cleanup release logic

6 years agotrack: Enable "free by ctx"
Arran Cudbard-Bell [Fri, 10 Apr 2020 23:12:04 +0000 (18:12 -0500)] 
track: Enable "free by ctx"

6 years agotrunk: Add callback that is called any time a request is remove from a connection
Arran Cudbard-Bell [Fri, 10 Apr 2020 23:01:13 +0000 (18:01 -0500)] 
trunk: Add callback that is called any time a request is remove from a connection

6 years agoTypo
Arran Cudbard-Bell [Fri, 10 Apr 2020 21:16:38 +0000 (16:16 -0500)] 
Typo

6 years agotrunk: Do tconn assignment earlier
Arran Cudbard-Bell [Fri, 10 Apr 2020 21:09:35 +0000 (16:09 -0500)] 
trunk: Do tconn assignment earlier

6 years agotrunk: Zero out log entry structs
Arran Cudbard-Bell [Fri, 10 Apr 2020 21:00:18 +0000 (16:00 -0500)] 
trunk: Zero out log entry structs

6 years agoTypo
Arran Cudbard-Bell [Fri, 10 Apr 2020 20:29:30 +0000 (15:29 -0500)] 
Typo

6 years agoclean up and allow async xlat's to work again
Alan T. DeKok [Fri, 10 Apr 2020 20:22:11 +0000 (16:22 -0400)] 
clean up and allow async xlat's to work again

6 years agodisable this for a day until we finish the async tmpl expansion
Alan T. DeKok [Fri, 10 Apr 2020 18:32:40 +0000 (14:32 -0400)] 
disable this for a day until we finish the async tmpl expansion

6 years agopcap: Fix multiple issues with fr_pcap_device_names - Closes #3363
Arran Cudbard-Bell [Fri, 10 Apr 2020 18:15:15 +0000 (13:15 -0500)] 
pcap: Fix multiple issues with fr_pcap_device_names - Closes #3363

- Strip trailing separation char correctly.
- Don't over allocate string buffer
- Don't use snprintf (it's slow).
- Don't use is_truncated... For some reason it doesn't work correctly here.

6 years agotrunk: Record info about the tconn the request is assigned to
Arran Cudbard-Bell [Fri, 10 Apr 2020 17:43:12 +0000 (12:43 -0500)] 
trunk: Record info about the tconn the request is assigned to

6 years agorlm_radius: Fix potential double-free (#3366)
Jorge Pereira [Fri, 10 Apr 2020 17:06:22 +0000 (14:06 -0300)] 
rlm_radius: Fix potential double-free (#3366)

6 years ago%{1} is async-safe
Alan T. DeKok [Fri, 10 Apr 2020 15:03:12 +0000 (11:03 -0400)] 
%{1} is async-safe

6 years agomake `foo` work again in the config files
Alan T. DeKok [Fri, 10 Apr 2020 14:51:35 +0000 (10:51 -0400)] 
make `foo` work again in the config files

this isn't strictly necessary and should probably be deleted.
But for now, it's a simple way to test UNLANG_TYPE_TMPL and
the async exec functionality

6 years agoset our async_safe value, based on the childs value
Alan T. DeKok [Fri, 10 Apr 2020 14:30:51 +0000 (10:30 -0400)] 
set our async_safe value, based on the childs value

6 years agoUNLANG_TYPE_TMPL is allowed to yield
Alan T. DeKok [Fri, 10 Apr 2020 14:30:26 +0000 (10:30 -0400)] 
UNLANG_TYPE_TMPL is allowed to yield

6 years agowalk over the list of child xlat nodes, too
Alan T. DeKok [Fri, 10 Apr 2020 14:30:01 +0000 (10:30 -0400)] 
walk over the list of child xlat nodes, too

6 years agowarning fixes
Alan T. DeKok [Fri, 10 Apr 2020 12:56:30 +0000 (08:56 -0400)] 
warning fixes

6 years agoremove UNLANG_TYPE_XLAT_INLINE and replace with UNLANG_TYPE_TMPL
Alan T. DeKok [Fri, 10 Apr 2020 12:44:34 +0000 (08:44 -0400)] 
remove UNLANG_TYPE_XLAT_INLINE and replace with UNLANG_TYPE_TMPL

which has the same functionality, but will also allow for async
template expansions.

6 years agostart of code for async template evaluation
Alan T. DeKok [Thu, 9 Apr 2020 21:28:28 +0000 (17:28 -0400)] 
start of code for async template evaluation

6 years agoadd more 'const'
Alan T. DeKok [Thu, 9 Apr 2020 20:28:26 +0000 (16:28 -0400)] 
add more 'const'

we shouldn't be modifying instructions as they are being interpreted.
they're essentially static after the server starts.

6 years agoradsniff: Check if fr_radius_init() started with success (#3362)
Jorge Pereira [Thu, 9 Apr 2020 22:28:18 +0000 (19:28 -0300)] 
radsniff: Check if fr_radius_init() started with success (#3362)

6 years agoradius_udp: Skip free ID allocations
Arran Cudbard-Bell [Thu, 9 Apr 2020 20:21:29 +0000 (15:21 -0500)] 
radius_udp: Skip free ID allocations

6 years agotrunk/radius: Print out detailed state log
Arran Cudbard-Bell [Thu, 9 Apr 2020 19:20:37 +0000 (14:20 -0500)] 
trunk/radius: Print out detailed state log

6 years agorequest: Record where allocation occurred
Arran Cudbard-Bell [Thu, 9 Apr 2020 19:20:15 +0000 (14:20 -0500)] 
request: Record where allocation occurred

6 years agoGeneralize the "hack" in dhcpv4_encode_xlat()
James Jones [Wed, 8 Apr 2020 16:41:00 +0000 (11:41 -0500)] 
Generalize the "hack" in dhcpv4_encode_xlat()

Add three functions:
- fr_cursor_filter_head()
- fr_cursor_filter_next()
- fr_cursor_filter_current()
to let one select items for which an "evaluation function" passed
the item and a context value returns true.

6 years agoadd and expose fr_exec_nowait()
Alan T. DeKok [Thu, 9 Apr 2020 18:30:27 +0000 (14:30 -0400)] 
add and expose fr_exec_nowait()

which is much simpler than the previous code.

6 years agoadd and expose fr_value_box_list_flatten_argv()
Alan T. DeKok [Thu, 9 Apr 2020 18:17:43 +0000 (14:17 -0400)] 
add and expose fr_value_box_list_flatten_argv()

which takes a list of value box groups (e.g. from xlat_eval)
and turns them into an argv-style array

6 years agoconstify things that don't modify their inputs
Alan T. DeKok [Thu, 9 Apr 2020 18:15:49 +0000 (14:15 -0400)] 
constify things that don't modify their inputs

6 years agoadd and expose tmpl_async_required()
Alan T. DeKok [Thu, 9 Apr 2020 17:57:20 +0000 (13:57 -0400)] 
add and expose tmpl_async_required()

6 years agoadd and expose xlat_async_required()
Alan T. DeKok [Thu, 9 Apr 2020 17:52:01 +0000 (13:52 -0400)] 
add and expose xlat_async_required()

6 years agobreak string across lines
Arran Cudbard-Bell [Thu, 9 Apr 2020 17:22:43 +0000 (12:22 -0500)] 
break string across lines

6 years agoradius_track: Non-debug version shouldn't have file/line
Arran Cudbard-Bell [Thu, 9 Apr 2020 17:22:35 +0000 (12:22 -0500)] 
radius_track: Non-debug version shouldn't have file/line

6 years agorework so CHILD_GROUP is no longer necessary
Alan T. DeKok [Thu, 9 Apr 2020 12:29:59 +0000 (08:29 -0400)] 
rework so CHILD_GROUP is no longer necessary

6 years agore-do commit 798ef3a9b
Alan T. DeKok [Thu, 9 Apr 2020 11:59:47 +0000 (07:59 -0400)] 
re-do commit 798ef3a9b

6 years agoreturn something
Arran Cudbard-Bell [Thu, 9 Apr 2020 03:12:52 +0000 (22:12 -0500)] 
return something

6 years agotrack: We still probably want this check for non-debug builds
Arran Cudbard-Bell [Thu, 9 Apr 2020 03:09:58 +0000 (22:09 -0500)] 
track: We still probably want this check for non-debug builds

6 years agoschedule: Fix debug messages for workers
Arran Cudbard-Bell [Thu, 9 Apr 2020 03:07:01 +0000 (22:07 -0500)] 
schedule: Fix debug messages for workers

6 years agotrunk: Remove asserts limiting states we can enter the failed state from
Arran Cudbard-Bell [Thu, 9 Apr 2020 03:04:32 +0000 (22:04 -0500)] 
trunk: Remove asserts limiting states we can enter the failed state from

6 years agoconnection: Allow nested signal pausing, and prevent duplicates
Arran Cudbard-Bell [Thu, 9 Apr 2020 02:36:10 +0000 (21:36 -0500)] 
connection: Allow nested signal pausing, and prevent duplicates

trunk: Pause connection signal delivery in more places

6 years agotrack: Disallow double allocations
Arran Cudbard-Bell [Thu, 9 Apr 2020 02:34:28 +0000 (21:34 -0500)] 
track: Disallow double allocations

6 years agoradius: Add check for treq being freed without releasing its tracking entry
Arran Cudbard-Bell [Thu, 9 Apr 2020 01:17:52 +0000 (20:17 -0500)] 
radius: Add check for treq being freed without releasing its tracking entry

6 years agoprobably not a valid assert given the way the rest of the public API works
Arran Cudbard-Bell [Wed, 8 Apr 2020 23:40:30 +0000 (18:40 -0500)] 
probably not a valid assert given the way the rest of the public API works

6 years agotrunk: Assert if we attempt to requeue a request in an invalid state
Arran Cudbard-Bell [Wed, 8 Apr 2020 23:38:28 +0000 (18:38 -0500)] 
trunk: Assert if we attempt to requeue a request in an invalid state

6 years agofixup evaluation of XLAT_CHILD nodes
Alan T. DeKok [Wed, 8 Apr 2020 21:31:02 +0000 (17:31 -0400)] 
fixup evaluation of XLAT_CHILD nodes

put the result into state->rhead
on resume, merge that result into the parent group

6 years agoparent string value from value_box we just created
Alan T. DeKok [Wed, 8 Apr 2020 21:30:11 +0000 (17:30 -0400)] 
parent string value from value_box we just created

6 years agoFix memory leak in radsniff (#3359)
Jorge Pereira [Wed, 8 Apr 2020 21:19:17 +0000 (18:19 -0300)] 
Fix memory leak in radsniff (#3359)

We should call pcap_freealldevs() always after pcap_findalldevs()

6 years agoadd async_exec method for testing async execs
Alan T. DeKok [Wed, 8 Apr 2020 20:58:48 +0000 (16:58 -0400)] 
add async_exec method for testing async execs

not done, and mostly for debugging the framework.  Will be
extended as the framework is fixed.

6 years agofix typo
Alan T. DeKok [Wed, 8 Apr 2020 20:26:50 +0000 (16:26 -0400)] 
fix typo

6 years agoallow things like --foo=%{bar}
Alan T. DeKok [Wed, 8 Apr 2020 20:19:16 +0000 (16:19 -0400)] 
allow things like --foo=%{bar}

for argv expansion.

6 years agostop on "p == end", too
Alan T. DeKok [Wed, 8 Apr 2020 20:18:16 +0000 (16:18 -0400)] 
stop on "p == end", too

6 years agoterminate string
Alan T. DeKok [Wed, 8 Apr 2020 19:58:38 +0000 (15:58 -0400)] 
terminate string

6 years agoforbid duplicate sections
Alan T. DeKok [Wed, 8 Apr 2020 19:25:07 +0000 (15:25 -0400)] 
forbid duplicate sections

6 years agorlm_radius: better assert
Arran Cudbard-Bell [Wed, 8 Apr 2020 18:04:06 +0000 (13:04 -0500)] 
rlm_radius: better assert

6 years agorlm_radius: Assert if we still have tracking entries when the connection is being...
Arran Cudbard-Bell [Wed, 8 Apr 2020 17:59:49 +0000 (12:59 -0500)] 
rlm_radius: Assert if we still have tracking entries when the connection is being closed

6 years agomore debug messages
Alan T. DeKok [Wed, 8 Apr 2020 17:38:44 +0000 (13:38 -0400)] 
more debug messages

6 years agoreturn "read error" when we're done reading
Alan T. DeKok [Wed, 8 Apr 2020 16:47:35 +0000 (12:47 -0400)] 
return "read error" when we're done reading

which then ensures that the sockets are closed.

6 years agoa blocked worker is now a non-fatal error.
Alan T. DeKok [Wed, 8 Apr 2020 16:40:13 +0000 (12:40 -0400)] 
a blocked worker is now a non-fatal error.

The network side just tries another worker.  And if all workers
are blocked, it suspends all network reads.

Then when a worker replies, it unsuspends the network IO

6 years agopass "inlen" to the various functions
Alan T. DeKok [Wed, 8 Apr 2020 15:56:01 +0000 (11:56 -0400)] 
pass "inlen" to the various functions

which mostly just pass it along to the functions they call,
and don't check it as much as they should.  But it's needed for
later work.

6 years agoscheduler: Don't need to destroy the network mutliple times
Arran Cudbard-Bell [Wed, 8 Apr 2020 16:27:26 +0000 (11:27 -0500)] 
scheduler: Don't need to destroy the network mutliple times

fr_network_exit now destroys the network too.

Calling it again on line 666 results in use-after-free issues with the message set.

6 years agonetwork: Pop messages before signalling workers to exit
Arran Cudbard-Bell [Wed, 8 Apr 2020 16:14:47 +0000 (11:14 -0500)] 
network: Pop messages before signalling workers to exit

6 years agofix problems introduced in commit 3e7e6970
Alan T. DeKok [Wed, 8 Apr 2020 15:01:35 +0000 (11:01 -0400)] 
fix problems introduced in commit 3e7e6970

u->code != code.  They are different variables with different
meanings.

6 years agocleanups and add fr_pair_ctx_reset
Alan T. DeKok [Wed, 8 Apr 2020 13:26:00 +0000 (09:26 -0400)] 
cleanups and add fr_pair_ctx_reset

in preparation for adding similar functions for tmpls and maps

6 years agotrack: Initialise file/line
Arran Cudbard-Bell [Wed, 8 Apr 2020 00:11:33 +0000 (19:11 -0500)] 
track: Initialise file/line

6 years agotrack: Add debugging code
Arran Cudbard-Bell [Wed, 8 Apr 2020 00:09:39 +0000 (19:09 -0500)] 
track: Add debugging code

6 years agotrunk: Initialise tconn
Arran Cudbard-Bell [Tue, 7 Apr 2020 22:51:10 +0000 (17:51 -0500)] 
trunk: Initialise tconn

6 years agotrunk: Always do checks for inst->recv_buff range if we're no on Linux
Arran Cudbard-Bell [Tue, 7 Apr 2020 22:20:52 +0000 (17:20 -0500)] 
trunk: Always do checks for inst->recv_buff range if we're no on Linux

6 years agotrack: We don't need to track num_free now the dlists have counters
Arran Cudbard-Bell [Tue, 7 Apr 2020 22:18:10 +0000 (17:18 -0500)] 
track: We don't need to track num_free now the dlists have counters

6 years agotrunk: Rate limit enqueue failure log messages
Arran Cudbard-Bell [Tue, 7 Apr 2020 21:51:03 +0000 (16:51 -0500)] 
trunk: Rate limit enqueue failure log messages

6 years agolog: Improve rate limiting macros
Arran Cudbard-Bell [Tue, 7 Apr 2020 21:43:11 +0000 (16:43 -0500)] 
log: Improve rate limiting macros

6 years agorlm_radius: Assert if we can't allocate a tracking entry
Arran Cudbard-Bell [Tue, 7 Apr 2020 20:34:03 +0000 (15:34 -0500)] 
rlm_radius: Assert if we can't allocate a tracking entry

We should only allow as many requests to be assigned to a connection as there are tracking entries available

6 years agoput queued treqs into the array
Alan T. DeKok [Tue, 7 Apr 2020 19:59:35 +0000 (15:59 -0400)] 
put queued treqs into the array

if we signal fail on one packet in the middle of looping over
'i', then 'queued != i'.  So track them separately.

6 years agotrunk: Assign different debug levels to different connection state transitions
Arran Cudbard-Bell [Tue, 7 Apr 2020 19:54:30 +0000 (14:54 -0500)] 
trunk: Assign different debug levels to different connection state transitions

6 years agoshouldn't set inst->recv_buff_is_set either
Arran Cudbard-Bell [Tue, 7 Apr 2020 17:49:37 +0000 (12:49 -0500)] 
shouldn't set inst->recv_buff_is_set either

6 years agorlm_radius: Only set recv buff to zero on Linux Closes #3355
Arran Cudbard-Bell [Tue, 7 Apr 2020 17:47:57 +0000 (12:47 -0500)] 
rlm_radius: Only set recv buff to zero on Linux Closes #3355

6 years agotrunk: Ensure requests are in the right states fo the lists they're in
Arran Cudbard-Bell [Tue, 7 Apr 2020 17:22:09 +0000 (12:22 -0500)] 
trunk: Ensure requests are in the right states fo the lists they're in

6 years agorlm_radius: More asserts
Arran Cudbard-Bell [Tue, 7 Apr 2020 17:15:53 +0000 (12:15 -0500)] 
rlm_radius: More asserts

6 years agocursor: store/restore fr_cursor_intersect_next's iterator function and uctx
Arran Cudbard-Bell [Tue, 7 Apr 2020 14:20:30 +0000 (09:20 -0500)] 
cursor: store/restore fr_cursor_intersect_next's iterator function and uctx

6 years agocursor: s/ctx/uctx/
Arran Cudbard-Bell [Tue, 7 Apr 2020 14:19:36 +0000 (09:19 -0500)] 
cursor: s/ctx/uctx/

6 years agotrunk: Fix missing 'return' (#3357)
Jorge Pereira [Tue, 7 Apr 2020 14:17:10 +0000 (11:17 -0300)] 
trunk: Fix missing 'return' (#3357)

6 years agotrunk: Inactive-Draining->Draining is fine
Arran Cudbard-Bell [Tue, 7 Apr 2020 04:55:50 +0000 (23:55 -0500)] 
trunk: Inactive-Draining->Draining is fine

6 years agowhitespace
Arran Cudbard-Bell [Tue, 7 Apr 2020 01:16:41 +0000 (20:16 -0500)] 
whitespace

6 years agoscheduler: Better identifiers when we're running in single threaded mode
Arran Cudbard-Bell [Tue, 7 Apr 2020 01:01:32 +0000 (20:01 -0500)] 
scheduler: Better identifiers when we're running in single threaded mode

6 years agonetwork: More orderly exit
Arran Cudbard-Bell [Tue, 7 Apr 2020 00:54:30 +0000 (19:54 -0500)] 
network: More orderly exit

6 years agotrunk: Better assert for unexpected post cancellation state
Arran Cudbard-Bell [Tue, 7 Apr 2020 00:52:52 +0000 (19:52 -0500)] 
trunk: Better assert for unexpected post cancellation state

6 years agorlm_radius: Fix debug message
Arran Cudbard-Bell [Mon, 6 Apr 2020 23:28:03 +0000 (18:28 -0500)] 
rlm_radius: Fix debug message

6 years agoevent: Add function to move events between event loops
Arran Cudbard-Bell [Mon, 6 Apr 2020 23:27:53 +0000 (18:27 -0500)] 
event: Add function to move events between event loops

6 years agono perror here...
Arran Cudbard-Bell [Mon, 6 Apr 2020 23:27:35 +0000 (18:27 -0500)] 
no perror here...

6 years agoadd fr_pair_ctx_afrom_str() API
Alan T. DeKok [Mon, 6 Apr 2020 21:34:02 +0000 (17:34 -0400)] 
add fr_pair_ctx_afrom_str() API

for parsing nested pairs with parent / child references

6 years agozero length names are not allowed, too
Alan T. DeKok [Mon, 6 Apr 2020 21:22:31 +0000 (17:22 -0400)] 
zero length names are not allowed, too

6 years agopublish skip_string API for quoted strings
Alan T. DeKok [Mon, 6 Apr 2020 16:44:52 +0000 (12:44 -0400)] 
publish skip_string API for quoted strings

6 years agounused args
Arran Cudbard-Bell [Mon, 6 Apr 2020 21:25:20 +0000 (16:25 -0500)] 
unused args

6 years agostrerror: Use PERROR() where available
Arran Cudbard-Bell [Mon, 6 Apr 2020 19:38:04 +0000 (14:38 -0500)] 
strerror: Use PERROR() where available

6 years agoSuppress leak warnings in talloc_set_memlimit() (#3354)
Jorge Pereira [Mon, 6 Apr 2020 21:22:46 +0000 (18:22 -0300)] 
Suppress leak warnings in talloc_set_memlimit() (#3354)

6 years agonetwork: Re-arrange functions to place "create" functions nearer the bottom
Arran Cudbard-Bell [Mon, 6 Apr 2020 16:55:20 +0000 (11:55 -0500)] 
network: Re-arrange functions to place "create" functions nearer the bottom

Prefix worker messages with the worker name