]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agopair: Put legacy functions into their own source file
Arran Cudbard-Bell [Sun, 15 Mar 2020 21:06:24 +0000 (17:06 -0400)] 
pair: Put legacy functions into their own source file

6 years agono need to set "dict" for attributes of type "group"
Alan T. DeKok [Sun, 15 Mar 2020 19:25:18 +0000 (15:25 -0400)] 
no need to set "dict" for attributes of type "group"

It's now in da->ref->dict

And we don't want to over-ride *our* definition of da->dict, which
points to the parent dictionary for this attribute.

6 years agomake the fuzzer a bit smarter
Alan T. DeKok [Sun, 15 Mar 2020 13:04:10 +0000 (09:04 -0400)] 
make the fuzzer a bit smarter

so that it finds the protocol name from argv[0]

and it allows -D dictionary_dir

6 years agounit_test_attribute: Encoding 0 bytes is an error too
Arran Cudbard-Bell [Sat, 14 Mar 2020 04:07:08 +0000 (00:07 -0400)] 
unit_test_attribute: Encoding 0 bytes is an error too

At least in terms of the unit tests

6 years agonet: Pretty but slow, and the compiler does a poor job optimising.
Arran Cudbard-Bell [Sat, 14 Mar 2020 04:04:51 +0000 (00:04 -0400)] 
net: Pretty but slow, and the compiler does a poor job optimising.

6 years agodict: Fix more const issues, and start creating public/private versions of structures
Arran Cudbard-Bell [Fri, 13 Mar 2020 22:19:09 +0000 (18:19 -0400)] 
dict: Fix more const issues, and start creating public/private versions of structures

6 years agodict: Remove fr_dict_dict_enum_by_value, Fixes #3321
Arran Cudbard-Bell [Fri, 13 Mar 2020 21:39:56 +0000 (17:39 -0400)] 
dict: Remove fr_dict_dict_enum_by_value, Fixes #3321

6 years agodict: Fix issues with last commit
Arran Cudbard-Bell [Fri, 13 Mar 2020 21:17:29 +0000 (17:17 -0400)] 
dict: Fix issues with last commit

6 years agodict: Add a dict pointer to every attribute
Arran Cudbard-Bell [Fri, 13 Mar 2020 20:34:35 +0000 (16:34 -0400)] 
dict: Add a dict pointer to every attribute

6 years agoradict: Log talloc aborts
Arran Cudbard-Bell [Fri, 13 Mar 2020 18:50:16 +0000 (14:50 -0400)] 
radict: Log talloc aborts

6 years agotrunk: Enable destructor _before_ starting the connection
Arran Cudbard-Bell [Fri, 13 Mar 2020 15:47:59 +0000 (11:47 -0400)] 
trunk: Enable destructor _before_ starting the connection

6 years agodebug: Free the null context so LSAN doesn't flag the memory as leaked
Arran Cudbard-Bell [Fri, 13 Mar 2020 04:28:48 +0000 (00:28 -0400)] 
debug: Free the null context so LSAN doesn't flag the memory as leaked

6 years agomissing: Cast output of builtin_bswap
Arran Cudbard-Bell [Fri, 13 Mar 2020 02:00:31 +0000 (22:00 -0400)] 
missing: Cast output of builtin_bswap

6 years agothread_local: TLS be static
Arran Cudbard-Bell [Fri, 13 Mar 2020 01:52:52 +0000 (21:52 -0400)] 
thread_local: TLS be static

6 years agoradsmp: Too early!
Arran Cudbard-Bell [Fri, 13 Mar 2020 01:38:16 +0000 (21:38 -0400)] 
radsmp: Too early!

6 years agoFormatting
Arran Cudbard-Bell [Fri, 13 Mar 2020 01:24:09 +0000 (21:24 -0400)] 
Formatting

6 years agothread_local: Make sure that the thread_local atexit handler is called _last_
Arran Cudbard-Bell [Fri, 13 Mar 2020 01:10:51 +0000 (21:10 -0400)] 
thread_local: Make sure that the thread_local atexit handler is called _last_

6 years agoglobal: Explicit free functions for memory that's also freed by thread-local destruct...
Arran Cudbard-Bell [Fri, 13 Mar 2020 00:21:58 +0000 (20:21 -0400)] 
global: Explicit free functions for memory that's also freed by thread-local destructors should be removed

Because they're not needed, because we fixed the underlying issue, and now they cause a double free!

6 years agoconfigure.ac: Add check for _builtin_czll net: Use that instead of flsll
Arran Cudbard-Bell [Fri, 13 Mar 2020 00:09:54 +0000 (20:09 -0400)] 
configure.ac: Add check for _builtin_czll net: Use that instead of flsll

6 years agothread_local: Rework thread local destructors
Arran Cudbard-Bell [Thu, 12 Mar 2020 23:25:38 +0000 (19:25 -0400)] 
thread_local: Rework thread local destructors

pthread_exit() no longer needs to be called in the main thread to ensure all the thread-local memory is cleaned up correctly

6 years agotrunk: Pause connection signals during connection_notify
Arran Cudbard-Bell [Thu, 12 Mar 2020 23:09:39 +0000 (19:09 -0400)] 
trunk: Pause connection signals during connection_notify

We need to write to the connection afterwards, so it's bad if it's freed out from under us...

6 years agoconnection: Add ability to pause deferred signals to stop the connection being freed...
Arran Cudbard-Bell [Thu, 12 Mar 2020 23:08:50 +0000 (19:08 -0400)] 
connection: Add ability to pause deferred signals to stop the connection being freed when the caller isn't aware

Only process deferred signals after the highest handler in the stack exits

6 years agonet: Use mutually acceptable naming scheme
Arran Cudbard-Bell [Thu, 12 Mar 2020 14:29:33 +0000 (10:29 -0400)] 
net: Use mutually acceptable naming scheme

6 years agomake sure there are trailing CRs
Alan T. DeKok [Thu, 12 Mar 2020 14:20:19 +0000 (10:20 -0400)] 
make sure there are trailing CRs

6 years agoFix sigsegv in --mode=execute without parameters fixes #3319
Alan T. DeKok [Thu, 12 Mar 2020 14:15:51 +0000 (10:15 -0400)] 
Fix sigsegv in --mode=execute without parameters fixes #3319

and print out a descriptive error message

6 years agonet: Fix fr_htonllx and fr_ntohll to produce big endian numbers... oops
Arran Cudbard-Bell [Wed, 11 Mar 2020 23:40:36 +0000 (19:40 -0400)] 
net: Fix fr_htonllx and fr_ntohll to produce big endian numbers... oops

6 years agocall pthread_exit, so thread destructors are called on exit
Alan T. DeKok [Wed, 11 Mar 2020 12:53:08 +0000 (08:53 -0400)] 
call pthread_exit, so thread destructors are called on exit

6 years agorearrange for simplicity
Alan T. DeKok [Wed, 11 Mar 2020 12:46:22 +0000 (08:46 -0400)] 
rearrange for simplicity

6 years agouse retry API
Alan T. DeKok [Wed, 11 Mar 2020 00:19:56 +0000 (20:19 -0400)] 
use retry API

6 years agomove to retry_config_t
Alan T. DeKok [Wed, 11 Mar 2020 00:11:00 +0000 (20:11 -0400)] 
move to retry_config_t

6 years agoFix typo
Jorge Pereira [Tue, 10 Mar 2020 23:14:13 +0000 (20:14 -0300)] 
Fix typo

6 years agotypo
Alan T. DeKok [Tue, 10 Mar 2020 19:49:37 +0000 (15:49 -0400)] 
typo

6 years agoalways go to the next step
Alan T. DeKok [Tue, 10 Mar 2020 19:42:34 +0000 (15:42 -0400)] 
always go to the next step

even if this step didn't receive all of the replies, or if
this step didn't reach it's expected PPS.

Then once we reach maximum PPS, go to the draining state, so that
it stops.

6 years agoIf the trunk it doing work when the event loop is exiting that's a pretty major bug
Arran Cudbard-Bell [Tue, 10 Mar 2020 18:30:59 +0000 (12:30 -0600)] 
If the trunk it doing work when the event loop is exiting that's a pretty major bug

6 years agorlm_redis: Add missing 'database' parameter (#3317)
Jorge Pereira [Tue, 10 Mar 2020 17:34:48 +0000 (14:34 -0300)] 
rlm_redis: Add missing 'database' parameter (#3317)

6 years agostop doing work if the event loop is exiting
Alan T. DeKok [Tue, 10 Mar 2020 17:15:30 +0000 (13:15 -0400)] 
stop doing work if the event loop is exiting

and therefore don't crash...

6 years agosigned / unsigned int issues
Alan T. DeKok [Tue, 10 Mar 2020 14:17:40 +0000 (10:17 -0400)] 
signed / unsigned int issues

6 years agotags of 0 can be omitted when printing
Alan T. DeKok [Tue, 10 Mar 2020 14:11:35 +0000 (10:11 -0400)] 
tags of 0 can be omitted when printing

6 years agoadd unit tests for Tunnel-Password
Alan T. DeKok [Tue, 10 Mar 2020 14:03:03 +0000 (10:03 -0400)] 
add unit tests for Tunnel-Password

now that we have seeded randomness

6 years agouse random padding, instead of zeros
Alan T. DeKok [Tue, 10 Mar 2020 14:01:00 +0000 (10:01 -0400)] 
use random padding, instead of zeros

that way if the salts are the same, the encoded data will still
be all different.

RFC 2868 Section 3.5 recommends that the padding is all zeros.
But the field already contains a length, so it's not necessary.

And for CoA-Request packets, the "encyption" of the password
is done via the request authenticator, which is all zeros.
So we rely only on the salt for security.  Which is small, and
therefore terrible.

Changing to random padding makes it harder to figure out what's
going on.

6 years agocrossbuild: add info about current image state
Matthew Newton [Mon, 9 Mar 2020 14:13:50 +0000 (14:13 +0000)] 
crossbuild: add info about current image state

6 years agouse CS_INT for variable, as that's what the function takes
Alan T. DeKok [Mon, 9 Mar 2020 12:22:14 +0000 (08:22 -0400)] 
use CS_INT for variable, as that's what the function takes

Instead of making the variable "int", and then casting it to
CS_INT when calling the function.  That just won't work.

6 years agofix HUP rate limit for large deltas in system time
Stephan E [Mon, 9 Mar 2020 11:18:17 +0000 (12:18 +0100)] 
fix HUP rate limit for large deltas in system time

The subtraction of the last HUP's time_t from the current time_t is cast into an int.
Depending on what int defaults to this may underflow and make HUPs impossible.
e.g. for a 32 bit signed int, after 69 years, HUPs will be rejected

6 years agokeep doxygen happy
Matthew Newton [Mon, 9 Mar 2020 10:46:16 +0000 (10:46 +0000)] 
keep doxygen happy

6 years agoremove profile tests if built without profiling
Alan T. DeKok [Mon, 9 Mar 2020 02:24:46 +0000 (22:24 -0400)] 
remove profile tests if built without profiling

6 years agomake the tests pass when readline isn't used
Alan T. DeKok [Sat, 7 Mar 2020 20:39:08 +0000 (15:39 -0500)] 
make the tests pass when readline isn't used

6 years agotypo: if defined
Matthew Newton [Sat, 7 Mar 2020 16:53:45 +0000 (16:53 +0000)] 
typo: if defined

6 years agofix up specfile for templates broken in b2f2d1b082
Matthew Newton [Sat, 7 Mar 2020 16:49:58 +0000 (16:49 +0000)] 
fix up specfile for templates broken in b2f2d1b082

6 years agotrunk: Expose tconn state too
Arran Cudbard-Bell [Fri, 6 Mar 2020 23:51:47 +0000 (17:51 -0600)] 
trunk: Expose tconn state too

6 years agorlm_radius_udp: Add assert to catch requests timing out in invalid states
Arran Cudbard-Bell [Fri, 6 Mar 2020 23:48:16 +0000 (17:48 -0600)] 
rlm_radius_udp: Add assert to catch requests timing out in invalid states

6 years agotrunk: expose treq state
Arran Cudbard-Bell [Fri, 6 Mar 2020 23:48:00 +0000 (17:48 -0600)] 
trunk: expose treq state

6 years agotrunk: Document fail_bound
Arran Cudbard-Bell [Fri, 6 Mar 2020 23:42:51 +0000 (17:42 -0600)] 
trunk: Document fail_bound

6 years agotrunk: Add sanity check to prevent internal asserts firing to fr_trunk_requeuest_requeue
Arran Cudbard-Bell [Fri, 6 Mar 2020 23:32:07 +0000 (17:32 -0600)] 
trunk: Add sanity check to prevent internal asserts firing to fr_trunk_requeuest_requeue

6 years agoclear ID on edge case when requeue on connection which is failed
Alan T. DeKok [Fri, 6 Mar 2020 23:19:31 +0000 (18:19 -0500)] 
clear ID on edge case when requeue on connection which is failed

6 years agovalue: Have fr_value_box_from_network return the correct negative offsets/errors...
Arran Cudbard-Bell [Fri, 6 Mar 2020 23:07:08 +0000 (17:07 -0600)] 
value: Have fr_value_box_from_network return the correct negative offsets/errors for decode issues

6 years agodhcpv6-decode: Return proper negative offsets and errors when decoding
Arran Cudbard-Bell [Fri, 6 Mar 2020 23:05:59 +0000 (17:05 -0600)] 
dhcpv6-decode: Return proper negative offsets and errors when decoding

6 years agodhcpv6-decode: Don't need to use fr_pair_list_free when we're freeing a single vp
Arran Cudbard-Bell [Fri, 6 Mar 2020 23:04:18 +0000 (17:04 -0600)] 
dhcpv6-decode: Don't need to use fr_pair_list_free when we're freeing a single vp

6 years agouse seeded randomness for tunnel passwords
Alan T. DeKok [Fri, 6 Mar 2020 22:23:18 +0000 (17:23 -0500)] 
use seeded randomness for tunnel passwords

and move counter to packet_ctx, instead of a "static" variable

6 years agopass encoder_ctx to encode tunnel password
Alan T. DeKok [Fri, 6 Mar 2020 22:14:59 +0000 (17:14 -0500)] 
pass encoder_ctx to encode tunnel password

6 years agoremove unused functions
Alan T. DeKok [Fri, 6 Mar 2020 21:54:48 +0000 (16:54 -0500)] 
remove unused functions

code duplication is waste

6 years agoadd small / fast random number generator
Alan T. DeKok [Fri, 6 Mar 2020 21:48:19 +0000 (16:48 -0500)] 
add small / fast random number generator

6 years agoeap/value: Remove duplicate macros
Arran Cudbard-Bell [Fri, 6 Mar 2020 22:23:18 +0000 (16:23 -0600)] 
eap/value: Remove duplicate macros

6 years agopair: Establish error codes for decoders
Arran Cudbard-Bell [Fri, 6 Mar 2020 21:48:24 +0000 (15:48 -0600)] 
pair: Establish error codes for decoders

6 years agonet: Missed space
Arran Cudbard-Bell [Fri, 6 Mar 2020 21:19:37 +0000 (15:19 -0600)] 
net: Missed space

6 years agonet: Fix function order
Arran Cudbard-Bell [Fri, 6 Mar 2020 20:54:40 +0000 (14:54 -0600)] 
net: Fix function order

6 years agonet: Use standard names for bytesex conversion functions
Arran Cudbard-Bell [Fri, 6 Mar 2020 20:51:15 +0000 (14:51 -0600)] 
net: Use standard names for bytesex conversion functions

Make all bytesex conversion functions use consistent argument names.

6 years agoMove htonx and ntohx to net.h
Arran Cudbard-Bell [Fri, 6 Mar 2020 16:24:27 +0000 (10:24 -0600)] 
Move htonx and ntohx to net.h

Remove radius_packet_t from net.h

6 years agoWas a two byte typo
Arran Cudbard-Bell [Fri, 6 Mar 2020 13:47:08 +0000 (07:47 -0600)] 
Was a two byte typo

6 years agoTypo
Arran Cudbard-Bell [Fri, 6 Mar 2020 03:51:08 +0000 (21:51 -0600)] 
Typo

6 years agomisc: Add htonx and ntohx
Arran Cudbard-Bell [Thu, 5 Mar 2020 23:55:18 +0000 (17:55 -0600)] 
misc: Add htonx and ntohx

For efficient packing and unpacking of network order integers, where the integer is of a variable size.

6 years agomisc.c: Move DIVIDE_CEIL into misc.h
Arran Cudbard-Bell [Thu, 5 Mar 2020 23:53:26 +0000 (17:53 -0600)] 
misc.c: Move DIVIDE_CEIL into misc.h

6 years agoredis: Cluster coordinator notes
Arran Cudbard-Bell [Thu, 5 Mar 2020 22:20:39 +0000 (16:20 -0600)] 
redis: Cluster coordinator notes

6 years agoredis/pipeline: Formatting
Arran Cudbard-Bell [Thu, 5 Mar 2020 22:00:47 +0000 (16:00 -0600)] 
redis/pipeline: Formatting

6 years agorlm_radius: Consistent terminology
Arran Cudbard-Bell [Thu, 5 Mar 2020 20:09:12 +0000 (14:09 -0600)] 
rlm_radius: Consistent terminology

6 years agorlm_radius: Formatting
Arran Cudbard-Bell [Thu, 5 Mar 2020 20:08:01 +0000 (14:08 -0600)] 
rlm_radius: Formatting

6 years agorlm_radius: Formatting
Arran Cudbard-Bell [Thu, 5 Mar 2020 20:00:27 +0000 (14:00 -0600)] 
rlm_radius: Formatting

6 years agorlm_radius: Finish manual test plan for rlm_radius
Arran Cudbard-Bell [Thu, 5 Mar 2020 19:54:38 +0000 (13:54 -0600)] 
rlm_radius: Finish manual test plan for rlm_radius

6 years agorlm_radius: Use the v3 name for this config item
Arran Cudbard-Bell [Thu, 5 Mar 2020 17:24:22 +0000 (11:24 -0600)] 
rlm_radius: Use the v3 name for this config item

6 years agoclear can_retransmit only for status-server
Alan T. DeKok [Thu, 5 Mar 2020 13:52:15 +0000 (08:52 -0500)] 
clear can_retransmit only for status-server

6 years agorlm_radius_udp: el is used
Arran Cudbard-Bell [Thu, 5 Mar 2020 02:40:31 +0000 (20:40 -0600)] 
rlm_radius_udp: el is used

6 years agotrunk: The correct fix here was to mirror the "init" state, not the failed state
Arran Cudbard-Bell [Thu, 5 Mar 2020 00:32:58 +0000 (18:32 -0600)] 
trunk: The correct fix here was to mirror the "init" state, not the failed state

6 years agotrunk: We don't need to do duplicate work on failed
Arran Cudbard-Bell [Thu, 5 Mar 2020 00:26:55 +0000 (18:26 -0600)] 
trunk: We don't need to do duplicate work on failed

6 years agotrunk: Implement backlog drain on fail
Arran Cudbard-Bell [Thu, 5 Mar 2020 00:26:24 +0000 (18:26 -0600)] 
trunk: Implement backlog drain on fail

6 years agotrunk: Typo
Arran Cudbard-Bell [Thu, 5 Mar 2020 00:26:00 +0000 (18:26 -0600)] 
trunk: Typo

6 years agotrunk: Initial state should be halted
Arran Cudbard-Bell [Wed, 4 Mar 2020 22:43:02 +0000 (16:43 -0600)] 
trunk: Initial state should be halted

6 years agocf_parse: Use consistent macro names
Arran Cudbard-Bell [Wed, 4 Mar 2020 22:38:38 +0000 (16:38 -0600)] 
cf_parse: Use consistent macro names

6 years agoretransmission is obnoxiously long, and rtx is well known
Arran Cudbard-Bell [Wed, 4 Mar 2020 22:36:13 +0000 (16:36 -0600)] 
retransmission is obnoxiously long, and rtx is well known

6 years agoWe use "max" everywhere else
Arran Cudbard-Bell [Wed, 4 Mar 2020 22:34:23 +0000 (16:34 -0600)] 
We use "max" everywhere else

6 years agorlm_radius_udp: Add note
Arran Cudbard-Bell [Wed, 4 Mar 2020 22:30:46 +0000 (16:30 -0600)] 
rlm_radius_udp: Add note

6 years agorlm_radius_udp: This comment is wrong too
Arran Cudbard-Bell [Wed, 4 Mar 2020 22:27:52 +0000 (16:27 -0600)] 
rlm_radius_udp: This comment is wrong too

6 years agorlm_radius_udp: Remove incorrect call to fr_retry_next
Arran Cudbard-Bell [Wed, 4 Mar 2020 22:25:19 +0000 (16:25 -0600)] 
rlm_radius_udp: Remove incorrect call to fr_retry_next

Resending a status-check packet because we want num_to_alive does not count as a retransmission, and should not increase the retransmission interval, and should not be subject to MRD or MRC.

6 years agorlm_radius_udp: Add a simpler implementation status checks that run before the connec...
Arran Cudbard-Bell [Wed, 4 Mar 2020 22:20:07 +0000 (16:20 -0600)] 
rlm_radius_udp: Add a simpler implementation status checks that run before the connection opens

6 years agorlm_radius_udp: Change status check talloc hierarchy to reflect a normal talloc hiera...
Arran Cudbard-Bell [Wed, 4 Mar 2020 21:49:54 +0000 (15:49 -0600)] 
rlm_radius_udp: Change status check talloc hierarchy to reflect a normal talloc hierarchy for requests/resume ctxs

6 years agorlm_radius_udp: Always enforce reply types
Arran Cudbard-Bell [Wed, 4 Mar 2020 21:48:14 +0000 (15:48 -0600)] 
rlm_radius_udp: Always enforce reply types

6 years agotrunk: Typo in timestamp comparison
Arran Cudbard-Bell [Wed, 4 Mar 2020 21:25:25 +0000 (15:25 -0600)] 
trunk: Typo in timestamp comparison

6 years agoBetter debugging on trunk start
Arran Cudbard-Bell [Wed, 4 Mar 2020 21:24:52 +0000 (15:24 -0600)] 
Better debugging on trunk start

6 years agotrunk: Failed and closed should _NOT_ be excluded from the set of connections
Arran Cudbard-Bell [Wed, 4 Mar 2020 21:24:12 +0000 (15:24 -0600)] 
trunk: Failed and closed should _NOT_ be excluded from the set of connections

6 years agotrunk: zero out treq pointers on free
Arran Cudbard-Bell [Wed, 4 Mar 2020 21:23:05 +0000 (15:23 -0600)] 
trunk: zero out treq pointers on free

6 years agorlm_radius_udp: Free handle using a talloc destructor
Arran Cudbard-Bell [Wed, 4 Mar 2020 18:19:26 +0000 (12:19 -0600)] 
rlm_radius_udp: Free handle using a talloc destructor

It's safer

6 years agoconnection: close connections which hit their connection timeout too
Arran Cudbard-Bell [Wed, 4 Mar 2020 18:18:05 +0000 (12:18 -0600)] 
connection: close connections which hit their connection timeout too

shuffle asserts for is_closed