]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agotrunk: Distinguish between INITIAL and UNASSIGNED states
Arran Cudbard-Bell [Fri, 20 Mar 2020 19:51:21 +0000 (13:51 -0600)] 
trunk: Distinguish between INITIAL and UNASSIGNED states

6 years agotrunk: The only valid state change for PARTIAL is PENDING -> PARTIAL
Arran Cudbard-Bell [Fri, 20 Mar 2020 19:51:00 +0000 (13:51 -0600)] 
trunk: The only valid state change for PARTIAL is PENDING -> PARTIAL

6 years agotrunk: De-conflict macro scoped variable names
Arran Cudbard-Bell [Fri, 20 Mar 2020 19:01:37 +0000 (13:01 -0600)] 
trunk: De-conflict macro scoped variable names

6 years agointerpret: Fix stupid debug message
Arran Cudbard-Bell [Fri, 20 Mar 2020 03:16:47 +0000 (21:16 -0600)] 
interpret: Fix stupid debug message

6 years agotrunk: Add asserts to catch a connection being halted that's still in one of the...
Arran Cudbard-Bell [Fri, 20 Mar 2020 03:12:19 +0000 (21:12 -0600)] 
trunk: Add asserts to catch a connection being halted that's still in one of the lists

6 years agoconfigure: Fix commit hash to 4 bytes (8 hexits)
Arran Cudbard-Bell [Thu, 19 Mar 2020 23:04:04 +0000 (17:04 -0600)] 
configure: Fix commit hash to 4 bytes (8 hexits)

6 years agoglobal: Mask off version correctly
Arran Cudbard-Bell [Thu, 19 Mar 2020 22:31:09 +0000 (16:31 -0600)] 
global: Mask off version correctly

6 years agoglobal: Include debug state in the magic number
Arran Cudbard-Bell [Thu, 19 Mar 2020 22:23:49 +0000 (16:23 -0600)] 
global: Include debug state in the magic number

6 years agorlm_radius_udp: Additional assert in request_timeout
Arran Cudbard-Bell [Thu, 19 Mar 2020 20:07:50 +0000 (14:07 -0600)] 
rlm_radius_udp: Additional assert in request_timeout

6 years agopass in/inlen to xlat_tokenize() functions
Alan T. DeKok [Thu, 19 Mar 2020 18:11:20 +0000 (14:11 -0400)] 
pass in/inlen to xlat_tokenize() functions

instead of "fmt".  This change lets us pass in substrings,
as with updating exec changes

6 years agorevert
Alan T. DeKok [Thu, 19 Mar 2020 17:53:24 +0000 (13:53 -0400)] 
revert

6 years agoraduat fixes (#3323)
Terry Burton [Thu, 19 Mar 2020 17:17:10 +0000 (17:17 +0000)] 
raduat fixes (#3323)

* raduat: Use the given instance of radclient

* raduat: Use the given DICTPATH

6 years agodepend on binaries
Alan T. DeKok [Thu, 19 Mar 2020 14:56:36 +0000 (10:56 -0400)] 
depend on binaries

6 years agoadd build rule to catch non-existent input files
Alan T. DeKok [Thu, 19 Mar 2020 12:47:13 +0000 (08:47 -0400)] 
add build rule to catch non-existent input files

6 years agoremove binary which doesn't exist
Alan T. DeKok [Thu, 19 Mar 2020 12:41:45 +0000 (08:41 -0400)] 
remove binary which doesn't exist

and depend on the full path to the tests

6 years agoUse consistent formatting
Alan T. DeKok [Thu, 19 Mar 2020 12:19:01 +0000 (08:19 -0400)] 
Use consistent formatting

via "make dictionary.format"

6 years agoAdded dictionary.vasexperts
B Thompson [Thu, 19 Mar 2020 08:52:06 +0000 (11:52 +0300)] 
Added dictionary.vasexperts

6 years agorlm_radius_udp: Cache the tconn, so we can still access it if the module
Arran Cudbard-Bell [Wed, 18 Mar 2020 22:56:11 +0000 (18:56 -0400)] 
rlm_radius_udp: Cache the tconn, so we can still access it if the module

6 years agoRemove MINGW32 ifdef's
Jorge Pereira [Wed, 18 Mar 2020 00:46:06 +0000 (21:46 -0300)] 
Remove MINGW32 ifdef's

6 years agocopy all bits FROM start_bit
Alan T. DeKok [Wed, 18 Mar 2020 20:38:12 +0000 (16:38 -0400)] 
copy all bits FROM start_bit

6 years agoprintf is more portable than "echo -n"
Alan T. DeKok [Wed, 18 Mar 2020 20:21:22 +0000 (16:21 -0400)] 
printf is more portable than "echo -n"

6 years agono need to copy `fmt`, it's been const for a while
Alan T. DeKok [Wed, 18 Mar 2020 19:51:27 +0000 (15:51 -0400)] 
no need to copy `fmt`, it's been const for a while

6 years agothis should take const
Alan T. DeKok [Wed, 18 Mar 2020 19:48:14 +0000 (15:48 -0400)] 
this should take const

6 years agomask off unused bits already in the buffer
Alan T. DeKok [Wed, 18 Mar 2020 13:11:35 +0000 (09:11 -0400)] 
mask off unused bits already in the buffer

instead of relying on the buffer to be zeroed.

6 years agoradius: Don't molest the request further if its connection has just become a zombie...
Arran Cudbard-Bell [Wed, 18 Mar 2020 02:15:30 +0000 (22:15 -0400)] 
radius: Don't molest the request further if its connection has just become a zombie.  It's suffered enough...

6 years agotrunk: Don't process invalid queue (#3326)
Jorge Pereira [Wed, 18 Mar 2020 01:58:23 +0000 (22:58 -0300)] 
trunk: Don't process invalid queue (#3326)

6 years agounit_test_attribute: Only < 0 is an error for encoders.
Arran Cudbard-Bell [Wed, 18 Mar 2020 00:09:19 +0000 (20:09 -0400)] 
unit_test_attribute: Only < 0 is an error for encoders.

6 years agorest: Use config.h from curl library
Arran Cudbard-Bell [Wed, 18 Mar 2020 00:02:44 +0000 (20:02 -0400)] 
rest: Use config.h from curl library

6 years agostatus_check can be zero
Alan T. DeKok [Tue, 17 Mar 2020 23:21:54 +0000 (19:21 -0400)] 
status_check can be zero

6 years agofix up ancient nonblock usage
Alan T. DeKok [Tue, 17 Mar 2020 21:06:37 +0000 (17:06 -0400)] 
fix up ancient nonblock usage

6 years agoremove mingw nonsense
Alan T. DeKok [Tue, 17 Mar 2020 21:02:21 +0000 (17:02 -0400)] 
remove mingw nonsense

6 years agocurl: Rework code to use fr_curl_io_request_t structs, which have the result of the...
Arran Cudbard-Bell [Tue, 17 Mar 2020 22:16:11 +0000 (18:16 -0400)] 
curl: Rework code to use fr_curl_io_request_t structs, which have the result of the operation written to them

We wouldn't need to do this, but curl provides no way of extracting the same info from the easy handle

6 years agounit_test_attribute: Only consider '-' special if it's at the end of a line
Arran Cudbard-Bell [Tue, 17 Mar 2020 04:03:39 +0000 (00:03 -0400)] 
unit_test_attribute: Only consider '-' special if it's at the end of a line

6 years agounit_test_attribute: Add function for writing the last returned value to the data...
Arran Cudbard-Bell [Tue, 17 Mar 2020 03:48:38 +0000 (23:48 -0400)] 
unit_test_attribute: Add function for writing the last returned value to the data buffer

6 years agolog: Add function for pretty printing hex with markers
Arran Cudbard-Bell [Tue, 17 Mar 2020 03:48:02 +0000 (23:48 -0400)] 
log: Add function for pretty printing hex with markers

6 years agocurl: Fix debug message
Arran Cudbard-Bell [Mon, 16 Mar 2020 22:06:01 +0000 (18:06 -0400)] 
curl: Fix debug message

6 years agorest: use the correct transfers field
Arran Cudbard-Bell [Mon, 16 Mar 2020 22:01:41 +0000 (18:01 -0400)] 
rest: use the correct transfers field

6 years agorest: This is specific to rest
Arran Cudbard-Bell [Mon, 16 Mar 2020 20:13:48 +0000 (16:13 -0400)] 
rest: This is specific to rest

6 years agocurl: Create libfreeradius-curl
Arran Cudbard-Bell [Mon, 16 Mar 2020 20:06:03 +0000 (16:06 -0400)] 
curl: Create libfreeradius-curl

6 years agopair: Change the group functions to take an explicit list struct
Arran Cudbard-Bell [Sun, 15 Mar 2020 23:21:40 +0000 (19:21 -0400)] 
pair: Change the group functions to take an explicit list struct

We can use _Generic to automatically select the correct functions later... Or maybe just change the invocation

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