]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agorlm_radius_udp: Use standard time printing functions
Arran Cudbard-Bell [Tue, 28 Apr 2020 15:44:17 +0000 (10:44 -0500)] 
rlm_radius_udp: Use standard time printing functions

Add macros to specify different precisions when boxing time deltas

6 years agoglue depends.mk into the boilermake framework
Alan T. DeKok [Tue, 28 Apr 2020 16:03:09 +0000 (12:03 -0400)] 
glue depends.mk into the boilermake framework

we can't just `-include foo.la` from the source make files, as
they are evaluated by the boilermake framework.  Instead, we have
to jump through some additional hoops

6 years agonot always hot I guess...
Arran Cudbard-Bell [Tue, 28 Apr 2020 14:29:47 +0000 (09:29 -0500)] 
not always hot I guess...

6 years agoautomate dependency checks on protocol libraries
Alan T. DeKok [Tue, 28 Apr 2020 14:28:38 +0000 (10:28 -0400)] 
automate dependency checks on protocol libraries

6 years agoInline calls in fr_event_loop
Arran Cudbard-Bell [Tue, 28 Apr 2020 14:22:04 +0000 (09:22 -0500)] 
Inline calls in fr_event_loop

6 years agotrunk: Signal a connection to halt if it has no requests and we're culling it
Arran Cudbard-Bell [Tue, 28 Apr 2020 14:10:37 +0000 (09:10 -0500)] 
trunk: Signal a connection to halt if it has no requests and we're culling it

6 years agoUpdate request/conn ratio after requeue
Arran Cudbard-Bell [Tue, 28 Apr 2020 13:42:21 +0000 (08:42 -0500)] 
Update request/conn ratio after requeue

6 years agoBetter error messages
Arran Cudbard-Bell [Tue, 28 Apr 2020 00:53:08 +0000 (19:53 -0500)] 
Better error messages

6 years agomain_loop: More thorough cleanups on main_loop exit
Arran Cudbard-Bell [Tue, 28 Apr 2020 00:38:19 +0000 (19:38 -0500)] 
main_loop: More thorough cleanups on main_loop exit

6 years agoevent: Unused code
Arran Cudbard-Bell [Mon, 27 Apr 2020 23:51:58 +0000 (18:51 -0500)] 
event: Unused code

6 years ago"now" not available in non-debug builds
Arran Cudbard-Bell [Mon, 27 Apr 2020 23:23:43 +0000 (18:23 -0500)] 
"now" not available in non-debug builds

6 years agoMake sure the ring buffer allocation functions aren't corrupting the message data...
Arran Cudbard-Bell [Mon, 27 Apr 2020 23:04:36 +0000 (18:04 -0500)] 
Make sure the ring buffer allocation functions aren't corrupting the message data somewhow

6 years agochannel: Add more detail to asserts
Arran Cudbard-Bell [Mon, 27 Apr 2020 23:03:54 +0000 (18:03 -0500)] 
channel: Add more detail to asserts

Assert if we try and send messages on a closed channel

6 years agoscheduler: Return an error in non-debug builds
Arran Cudbard-Bell [Mon, 27 Apr 2020 22:27:34 +0000 (17:27 -0500)] 
scheduler: Return an error in non-debug builds

6 years agoQuiet compiler
Arran Cudbard-Bell [Mon, 27 Apr 2020 22:02:31 +0000 (17:02 -0500)] 
Quiet compiler

6 years agoscheduler: Fix doxygen
Arran Cudbard-Bell [Mon, 27 Apr 2020 21:45:16 +0000 (16:45 -0500)] 
scheduler: Fix doxygen

6 years agorlm_radius: Mark status_check_alloc as nonnull
Arran Cudbard-Bell [Mon, 27 Apr 2020 21:45:06 +0000 (16:45 -0500)] 
rlm_radius: Mark status_check_alloc as nonnull

6 years agodbuff: Add test file
Arran Cudbard-Bell [Mon, 27 Apr 2020 21:42:22 +0000 (16:42 -0500)] 
dbuff: Add test file

Remove some duplicate code

Don't bother repeating operations all the way up the stack, just advance the pointer.

6 years agoMinor grammar issues
Arran Cudbard-Bell [Mon, 27 Apr 2020 21:30:38 +0000 (16:30 -0500)] 
Minor grammar issues

6 years agoradius: Destroy the scheduler before exiting when failing because of a listener intii...
Arran Cudbard-Bell [Mon, 27 Apr 2020 21:21:45 +0000 (16:21 -0500)] 
radius: Destroy the scheduler before exiting when failing because of a listener intiialisation error

6 years agoRevert "we only delete these when the event loop is exiting"
Arran Cudbard-Bell [Mon, 27 Apr 2020 20:48:52 +0000 (15:48 -0500)] 
Revert "we only delete these when the event loop is exiting"

This reverts commit 2700420d0d1f2f37a74b44f2e6817cb5aaf58c28.

6 years agotalloc: Fix useless strdup when initialising memory chunks
Arran Cudbard-Bell [Mon, 27 Apr 2020 20:36:24 +0000 (15:36 -0500)] 
talloc: Fix useless strdup when initialising memory chunks

6 years agowe only delete these when the event loop is exiting
Alan T. DeKok [Mon, 27 Apr 2020 20:03:12 +0000 (16:03 -0400)] 
we only delete these when the event loop is exiting

6 years agodbuff: Change macro names to make it clearer what they do
Arran Cudbard-Bell [Fri, 24 Apr 2020 23:27:32 +0000 (18:27 -0500)] 
dbuff: Change macro names to make it clearer what they do

Add compound literal macro to make it easier to do dbuff migrations

6 years agodbuff: Add memset function
Arran Cudbard-Bell [Fri, 24 Apr 2020 22:45:28 +0000 (17:45 -0500)] 
dbuff: Add memset function

6 years agodbuff: Add macros for "reserving" space in a dbuff when passing to a caller.
Arran Cudbard-Bell [Fri, 24 Apr 2020 21:48:29 +0000 (16:48 -0500)] 
dbuff: Add macros for "reserving" space in a dbuff when passing to a caller.

Add variadic macro for copying a byte sequence

6 years agomore tests for tags.
Alan T. DeKok [Fri, 24 Apr 2020 19:51:23 +0000 (15:51 -0400)] 
more tests for tags.

If we're asked to decode a 32-bit integer with an invalid tag,
then it's an invalid attribute.

If we're asked to encode a string where the first byte looks like
a valid tag, then we always encode the tag (even 0) to avoid
confusion.

6 years agoarmour the control FDs.
Alan T. DeKok [Fri, 24 Apr 2020 15:43:38 +0000 (11:43 -0400)] 
armour the control FDs.

They are needed while the server is running.

6 years agoadd debug API for armouring FDs
Alan T. DeKok [Fri, 24 Apr 2020 15:43:08 +0000 (11:43 -0400)] 
add debug API for armouring FDs

this API is likely short-lived until we discover what is
accidentally deleting the FDs

6 years agostop the event loop before we exit
Alan T. DeKok [Fri, 24 Apr 2020 15:22:42 +0000 (11:22 -0400)] 
stop the event loop before we exit

6 years agothe first entry of the heap can't be NULL
Alan T. DeKok [Fri, 24 Apr 2020 14:15:04 +0000 (10:15 -0400)] 
the first entry of the heap can't be NULL

6 years agoadd test for multiple attributes
Alan T. DeKok [Thu, 23 Apr 2020 19:00:48 +0000 (15:00 -0400)] 
add test for multiple attributes

6 years agoit helps to sign the packets.
Alan T. DeKok [Thu, 23 Apr 2020 18:59:33 +0000 (14:59 -0400)] 
it helps to sign the packets.

Note the the salted fields still don't have deterministic
randomness.  That will need to be fixed by passing packet_ctx
to fr_radius_encode()

6 years agorlm_radius/test_plan: Disconnect-Message must not contain 'Service-Type' (#3403)
Jorge Pereira [Fri, 24 Apr 2020 00:29:26 +0000 (21:29 -0300)] 
rlm_radius/test_plan: Disconnect-Message must not contain 'Service-Type' (#3403)

* rlm_radius/test_plan: Disconnect-Message must not contain 'Service-Type'

* Change Service-Type for CoA-Request to Authorize-Only

Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
6 years agoeap/sim: Fix minor leak (#3402)
Jorge Pereira [Thu, 23 Apr 2020 19:44:50 +0000 (16:44 -0300)] 
eap/sim: Fix minor leak (#3402)

Let's release all allocated memory when something goes wrong.

6 years agoMove EAP-AKA to fr_cursor_filter*() and away from {is, first, next}_encodable()....
James Jones [Thu, 23 Apr 2020 18:11:24 +0000 (13:11 -0500)] 
Move EAP-AKA to fr_cursor_filter*() and away from {is, first, next}_encodable(). (#3365)

6 years agoeap/chbind: Fix minor leak (#3401)
Jorge Pereira [Thu, 23 Apr 2020 18:10:13 +0000 (15:10 -0300)] 
eap/chbind: Fix minor leak (#3401)

It's always good to release all allocated memory when something goes wrong.

6 years agodbuff: macrolike length calculation functions
Arran Cudbard-Bell [Thu, 23 Apr 2020 18:07:25 +0000 (13:07 -0500)] 
dbuff: macrolike length calculation functions

6 years agodbuff: Extremely basic initial implementation
Arran Cudbard-Bell [Thu, 23 Apr 2020 17:54:08 +0000 (12:54 -0500)] 
dbuff: Extremely basic initial implementation

6 years agoneed pair.h here
Arran Cudbard-Bell [Thu, 23 Apr 2020 17:46:03 +0000 (12:46 -0500)] 
need pair.h here

6 years agoradius-encoder: Fix return codes and length checks
Arran Cudbard-Bell [Thu, 23 Apr 2020 17:13:23 +0000 (12:13 -0500)] 
radius-encoder: Fix return codes and length checks

6 years agoradius-encode: Use the common functions
Arran Cudbard-Bell [Thu, 23 Apr 2020 03:22:11 +0000 (22:22 -0500)] 
radius-encode: Use the common functions

6 years agoadded test point for protocol encoder
Alan T. DeKok [Thu, 23 Apr 2020 13:22:45 +0000 (09:22 -0400)] 
added test point for protocol encoder

6 years agorlm_radius: Apply same fix to replicate muxer as non-replicating muxer
Arran Cudbard-Bell [Thu, 23 Apr 2020 02:41:51 +0000 (21:41 -0500)] 
rlm_radius: Apply same fix to replicate muxer as non-replicating muxer

6 years agorlm_radius: Clear output buffer if there's an error, closes #3400
Arran Cudbard-Bell [Wed, 22 Apr 2020 23:20:22 +0000 (18:20 -0500)] 
rlm_radius: Clear output buffer if there's an error, closes #3400

6 years agotrunk: continue after packet encoding failures, don't return.
Arran Cudbard-Bell [Wed, 22 Apr 2020 23:18:11 +0000 (18:18 -0500)] 
trunk: continue after packet encoding failures, don't return.

6 years agoradius-encode: Change some contentious behaviour
Arran Cudbard-Bell [Wed, 22 Apr 2020 23:17:48 +0000 (18:17 -0500)] 
radius-encode: Change some contentious behaviour

- Rework encrypted password functions to use a more common signature
- Skip encoding values greater than 253 bytes
- Don't use intermediary buffer when encoding fixed length values, write them directly to the output buffer
- Return the number of bytes we would have needed when encoding attribute values.
- Fix struct TLV encoding as it didn't advance the output buffer pointer.
- Write the tag byte for all types if the VP says we should.
- Allow encoding of floats

6 years agounit_test_attribute: Add support for encode-pair "torture" tests
Arran Cudbard-Bell [Wed, 22 Apr 2020 23:09:17 +0000 (18:09 -0500)] 
unit_test_attribute: Add support for encode-pair "torture" tests

If running under ASAN allocate a special buffer with a 1K poisoned region before and after to detect buffer overflows/underflows.

6 years agorlm_radius: Emit error if we failed encoding a packet, and free the buffer
Arran Cudbard-Bell [Wed, 22 Apr 2020 20:04:18 +0000 (15:04 -0500)] 
rlm_radius: Emit error if we failed encoding a packet, and free the buffer

6 years agomove assert and simplify code
Alan T. DeKok [Wed, 22 Apr 2020 19:47:14 +0000 (15:47 -0400)] 
move assert and simplify code

6 years agotrunk: Fix bad assert
Arran Cudbard-Bell [Wed, 22 Apr 2020 19:26:17 +0000 (14:26 -0500)] 
trunk: Fix bad assert

6 years agoexec: Fix minor leaks (#3399)
Jorge Pereira [Wed, 22 Apr 2020 18:51:16 +0000 (15:51 -0300)] 
exec: Fix minor leaks (#3399)

It's always good to release all allocated memory when something goes wrong.

6 years agotruncate after encoding, not before
Alan T. DeKok [Wed, 22 Apr 2020 18:38:47 +0000 (14:38 -0400)] 
truncate after encoding, not before

6 years agoallow for truncation of output buffers
Alan T. DeKok [Wed, 22 Apr 2020 15:54:48 +0000 (11:54 -0400)] 
allow for truncation of output buffers

and test for it

6 years agotruncate password as necessary
Alan T. DeKok [Wed, 22 Apr 2020 15:54:25 +0000 (11:54 -0400)] 
truncate password as necessary

6 years agocleanups and fixes
Alan T. DeKok [Wed, 22 Apr 2020 15:02:12 +0000 (11:02 -0400)] 
cleanups and fixes

make scan happy.

6 years agoadd input_fd functionality to async exec-wait
Alan T. DeKok [Wed, 22 Apr 2020 13:34:24 +0000 (09:34 -0400)] 
add input_fd functionality to async exec-wait

6 years agoQuiet travis
Arran Cudbard-Bell [Wed, 22 Apr 2020 03:15:29 +0000 (22:15 -0500)] 
Quiet travis

6 years agotrunk: More asserts
Arran Cudbard-Bell [Wed, 22 Apr 2020 02:44:03 +0000 (21:44 -0500)] 
trunk: More asserts

Insulate requeue function from connection state changes

6 years agoPrint out why the heap extract failed
Arran Cudbard-Bell [Wed, 22 Apr 2020 01:47:31 +0000 (20:47 -0500)] 
Print out why the heap extract failed

6 years agoRequire a recent version of gnu make
Arran Cudbard-Bell [Wed, 22 Apr 2020 00:44:42 +0000 (19:44 -0500)] 
Require a recent version of gnu make

6 years agoAlways set pointers to NULL when we're freeing
Arran Cudbard-Bell [Wed, 22 Apr 2020 00:44:17 +0000 (19:44 -0500)] 
Always set pointers to NULL when we're freeing

6 years agorlm_radius: Limit the maximum number of packets we try and send out at once
Arran Cudbard-Bell [Tue, 21 Apr 2020 23:43:59 +0000 (18:43 -0500)] 
rlm_radius: Limit the maximum number of packets we try and send out at once

6 years agochannel: Print the queue size when we fail to push items onto it
Arran Cudbard-Bell [Tue, 21 Apr 2020 21:18:12 +0000 (16:18 -0500)] 
channel: Print the queue size when we fail to push items onto it

6 years agoatomic_queue: Should use size_t for queue size
Arran Cudbard-Bell [Tue, 21 Apr 2020 21:17:48 +0000 (16:17 -0500)] 
atomic_queue: Should use size_t for queue size

6 years agoatomic_queue: Fix useless strcpy every time we allocate a queue
Arran Cudbard-Bell [Tue, 21 Apr 2020 21:17:21 +0000 (16:17 -0500)] 
atomic_queue: Fix useless strcpy every time we allocate a queue

6 years agodlopen: Quiet compiler (#3397)
Jorge Pereira [Tue, 21 Apr 2020 19:11:09 +0000 (16:11 -0300)] 
dlopen: Quiet compiler (#3397)

6 years agopreliminary work to make various fields configurable
Alan T. DeKok [Tue, 21 Apr 2020 19:08:10 +0000 (15:08 -0400)] 
preliminary work to make various fields configurable

6 years agoBetter debugging
Arran Cudbard-Bell [Tue, 21 Apr 2020 18:55:18 +0000 (13:55 -0500)] 
Better debugging

6 years agoinclude src/build earlier in the process
Alan T. DeKok [Tue, 21 Apr 2020 12:53:39 +0000 (08:53 -0400)] 
include src/build earlier in the process

6 years agoonly build if we have gnumake.h
Alan T. DeKok [Tue, 21 Apr 2020 12:51:50 +0000 (08:51 -0400)] 
only build if we have gnumake.h

6 years agohoist autoconf.mk rules higher
Alan T. DeKok [Tue, 21 Apr 2020 12:48:16 +0000 (08:48 -0400)] 
hoist autoconf.mk rules higher

so that they are accessible to the entire build system

6 years agoadd tests for <gnumake.h>, and regenerate
Alan T. DeKok [Tue, 21 Apr 2020 12:47:01 +0000 (08:47 -0400)] 
add tests for <gnumake.h>, and regenerate

6 years agoremove old mingw / windows stuff.
Alan T. DeKok [Tue, 21 Apr 2020 12:40:51 +0000 (08:40 -0400)] 
remove old mingw / windows stuff.

we don't need it

6 years agorlm_radius: Unused
Arran Cudbard-Bell [Tue, 21 Apr 2020 02:32:37 +0000 (21:32 -0500)] 
rlm_radius: Unused

6 years agoFix call to rad_assert
Arran Cudbard-Bell [Tue, 21 Apr 2020 01:31:23 +0000 (20:31 -0500)] 
Fix call to rad_assert

6 years agorlm_radius: Do less work when replicating
Arran Cudbard-Bell [Tue, 21 Apr 2020 01:17:25 +0000 (20:17 -0500)] 
rlm_radius: Do less work when replicating

6 years agoh->tt may be NULL, to match conn_close()
Alan T. DeKok [Tue, 21 Apr 2020 00:31:41 +0000 (20:31 -0400)] 
h->tt may be NULL, to match conn_close()

6 years agocomment out things we don't need
Alan T. DeKok [Tue, 21 Apr 2020 00:10:33 +0000 (20:10 -0400)] 
comment out things we don't need

6 years agorlm_radius/test_plan: Fix typo (#3395)
Jorge Pereira [Mon, 20 Apr 2020 22:47:41 +0000 (19:47 -0300)] 
rlm_radius/test_plan: Fix typo (#3395)

6 years agorework to cache handles
Alan T. DeKok [Mon, 20 Apr 2020 20:46:35 +0000 (16:46 -0400)] 
rework to cache handles

and simplify the pathname finding

6 years agowe don't need a configuration flag for use_delta
Alan T. DeKok [Mon, 20 Apr 2020 20:35:56 +0000 (16:35 -0400)] 
we don't need a configuration flag for use_delta

it's safe to always set it

6 years agoRevert "Add documentation for 'use_deltas'. ref #3390 (#3392)"
Alan T. DeKok [Mon, 20 Apr 2020 20:32:00 +0000 (16:32 -0400)] 
Revert "Add documentation for 'use_deltas'. ref #3390 (#3392)"

This reverts commit 3b7e93ac6a6f159adabda8285b1a4eaefebe5c2c.

after some investigation, this doesn't need to be a user-configurable
flag.

6 years agotypo
Alan T. DeKok [Fri, 17 Apr 2020 21:40:22 +0000 (17:40 -0400)] 
typo

6 years agoadd 'make doc'
Alan T. DeKok [Fri, 17 Apr 2020 21:35:58 +0000 (17:35 -0400)] 
add 'make doc'

because I can't remember anything more complex, and I keep
typing "make doc" which doesn't work.

So if it's the first thing I type, it should work.

6 years agoAdd initial code for dlopen() from within make. (#3380)
James Jones [Mon, 20 Apr 2020 19:26:44 +0000 (14:26 -0500)] 
Add initial code for dlopen() from within make. (#3380)

* Add code to get absolute path of dynamic library files from within make.

* Add extern declaration to make -Wmissing-variable-declarations happy.

6 years agoAdd documentation for 'use_deltas'. ref #3390 (#3392)
Jorge Pereira [Mon, 20 Apr 2020 19:25:04 +0000 (16:25 -0300)] 
Add documentation for 'use_deltas'. ref #3390 (#3392)

6 years agoEnable support for delta CRLs (#3390)
robober [Mon, 20 Apr 2020 12:46:28 +0000 (19:46 +0700)] 
Enable support for delta CRLs (#3390)

Co-authored-by: Pavel Istomin <pavel.istomin@eltex.loc>
6 years agoTypo
Arran Cudbard-Bell [Sun, 19 Apr 2020 02:08:31 +0000 (21:08 -0500)] 
Typo

6 years agotrunk: Add triggers for request state transitions in debug builds
Arran Cudbard-Bell [Sun, 19 Apr 2020 01:56:08 +0000 (20:56 -0500)] 
trunk: Add triggers for request state transitions in debug builds

6 years agoFix order
Arran Cudbard-Bell [Sun, 19 Apr 2020 01:42:58 +0000 (20:42 -0500)] 
Fix order

6 years agotypo
Arran Cudbard-Bell [Sun, 19 Apr 2020 01:33:10 +0000 (20:33 -0500)] 
typo

6 years agoconnection: Use lookup table for connection names
Arran Cudbard-Bell [Sat, 18 Apr 2020 20:51:51 +0000 (15:51 -0500)] 
connection: Use lookup table for connection names

6 years agotrunk: fr_dlist_remove returns NULL when removing the list head
Arran Cudbard-Bell [Sat, 18 Apr 2020 20:30:15 +0000 (15:30 -0500)] 
trunk: fr_dlist_remove returns NULL when removing the list head

6 years agotrunk: Asserts around log entry removal
Arran Cudbard-Bell [Sat, 18 Apr 2020 20:20:55 +0000 (15:20 -0500)] 
trunk: Asserts around log entry removal

6 years agotable: Add table indexed by numeric value
Arran Cudbard-Bell [Sat, 18 Apr 2020 20:21:32 +0000 (15:21 -0500)] 
table: Add table indexed by numeric value

i.e. an array lookup...

# Conflicts:
# src/lib/util/table.c

6 years agoFix typo (#3383)
Jorge Pereira [Fri, 17 Apr 2020 18:44:12 +0000 (15:44 -0300)] 
Fix typo (#3383)

6 years agotrunk: Allow INIT -> CLOSED
Arran Cudbard-Bell [Fri, 17 Apr 2020 18:39:54 +0000 (13:39 -0500)] 
trunk: Allow INIT -> CLOSED

6 years agotrunk: Don't double remove log entries, reduce memory churn in log entries by re...
Arran Cudbard-Bell [Fri, 17 Apr 2020 18:36:46 +0000 (13:36 -0500)] 
trunk: Don't double remove log entries, reduce memory churn in log entries by re-using old entries.  Re-use the oldest entry.

6 years agotrunk: Correct size for trigger table
Arran Cudbard-Bell [Fri, 17 Apr 2020 18:34:51 +0000 (13:34 -0500)] 
trunk: Correct size for trigger table