]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agoconnection: Expose connection state for asserting
Arran Cudbard-Bell [Wed, 4 Mar 2020 18:17:22 +0000 (12:17 -0600)] 
connection: Expose connection state for asserting

6 years agorlm_radius_udp: Explicitly free the status check timer on conn close
Arran Cudbard-Bell [Wed, 4 Mar 2020 16:09:13 +0000 (10:09 -0600)] 
rlm_radius_udp: Explicitly free the status check timer on conn close

6 years agorlm_radius_udp: Explicitly free h on conn close
Arran Cudbard-Bell [Wed, 4 Mar 2020 16:08:42 +0000 (10:08 -0600)] 
rlm_radius_udp: Explicitly free h on conn close

6 years agorlm_radius_udp: More detailed error messages
Arran Cudbard-Bell [Wed, 4 Mar 2020 16:08:25 +0000 (10:08 -0600)] 
rlm_radius_udp: More detailed error messages

6 years agotrunk: Add init state to mirror the connection API's init state
Arran Cudbard-Bell [Wed, 4 Mar 2020 16:07:35 +0000 (10:07 -0600)] 
trunk: Add init state to mirror the connection API's init state

Fixes a wide range of asserts

6 years agotrunk: Remove request count by state for states which cannot have requests
Arran Cudbard-Bell [Wed, 4 Mar 2020 16:03:47 +0000 (10:03 -0600)] 
trunk: Remove request count by state for states which cannot have requests

6 years agoconnection: Use a single event, and free it explicitly when the connection is freed
Arran Cudbard-Bell [Wed, 4 Mar 2020 16:03:06 +0000 (10:03 -0600)] 
connection: Use a single event, and free it explicitly when the connection is freed

Slightly simpler/more robust code

6 years agotrunk: Add function for removing connections from lists
Arran Cudbard-Bell [Wed, 4 Mar 2020 15:22:44 +0000 (09:22 -0600)] 
trunk: Add function for removing connections from lists

Deal with "fail" state properly.

6 years agotrunk: Allow connecting connections to be pruned
Arran Cudbard-Bell [Wed, 4 Mar 2020 15:20:40 +0000 (09:20 -0600)] 
trunk: Allow connecting connections to be pruned

6 years agotrunk: More verbose warning about request limits
Arran Cudbard-Bell [Wed, 4 Mar 2020 15:19:47 +0000 (09:19 -0600)] 
trunk: More verbose warning about request limits

6 years agoUpdate dictionary.erx (#3312)
Arran Cudbard-Bell [Wed, 4 Mar 2020 18:53:43 +0000 (12:53 -0600)] 
Update dictionary.erx (#3312)

Refreshed against upstream documentation linked in the comments.

Also attribute ERX-Cos-Shaping-Rate (177) seen on the wire.

6 years agoconnection: Close failed connections
Arran Cudbard-Bell [Wed, 4 Mar 2020 14:32:13 +0000 (08:32 -0600)] 
connection: Close failed connections

6 years agorlm_radius_udp: check_for_zombie does not nuke u->rr
Arran Cudbard-Bell [Wed, 4 Mar 2020 01:24:40 +0000 (19:24 -0600)] 
rlm_radius_udp: check_for_zombie does not nuke u->rr

6 years agorlm_radius_udp: Reset num_replies to 0 on timeout.
Arran Cudbard-Bell [Wed, 4 Mar 2020 01:22:39 +0000 (19:22 -0600)] 
rlm_radius_udp: Reset num_replies to 0 on timeout.

6 years agorlm_radius_udp: Simplify radius_retry_next call
Arran Cudbard-Bell [Wed, 4 Mar 2020 01:16:02 +0000 (19:16 -0600)] 
rlm_radius_udp: Simplify radius_retry_next call

6 years agorlm_radius_udp: Simplify retry_next call
Arran Cudbard-Bell [Wed, 4 Mar 2020 01:14:01 +0000 (19:14 -0600)] 
rlm_radius_udp: Simplify retry_next call

6 years agorlm_radius_udp: Formatting
Arran Cudbard-Bell [Wed, 4 Mar 2020 01:13:16 +0000 (19:13 -0600)] 
rlm_radius_udp: Formatting

6 years agorlm_radius_udp: Move udp_request_clear
Arran Cudbard-Bell [Wed, 4 Mar 2020 01:12:04 +0000 (19:12 -0600)] 
rlm_radius_udp: Move udp_request_clear

6 years agoAdd HEXDUMP[1-4] macros
Arran Cudbard-Bell [Wed, 4 Mar 2020 01:11:10 +0000 (19:11 -0600)] 
Add HEXDUMP[1-4] macros

6 years agorlm_radius: Make status_check.num_to_alive configurable
Arran Cudbard-Bell [Wed, 4 Mar 2020 01:10:55 +0000 (19:10 -0600)] 
rlm_radius: Make status_check.num_to_alive configurable

6 years agorlm_radius_udp: Add reset function for status_check packets
Arran Cudbard-Bell [Wed, 4 Mar 2020 01:09:55 +0000 (19:09 -0600)] 
rlm_radius_udp: Add reset function for status_check packets

6 years agorlm_radius_udp: Prioritise status check packets
Arran Cudbard-Bell [Wed, 4 Mar 2020 00:49:25 +0000 (18:49 -0600)] 
rlm_radius_udp: Prioritise status check packets

6 years agoAdd support to handle coredumps on FreeBSD (#3310)
Jorge Pereira [Wed, 4 Mar 2020 02:52:07 +0000 (23:52 -0300)] 
Add support to handle coredumps on FreeBSD (#3310)

6 years agotrunk: Typo
Arran Cudbard-Bell [Tue, 3 Mar 2020 23:21:04 +0000 (17:21 -0600)] 
trunk: Typo

6 years agotrunk: Expose more fields in the connection and trunk
Arran Cudbard-Bell [Tue, 3 Mar 2020 22:42:58 +0000 (16:42 -0600)] 
trunk: Expose more fields in the connection and trunk

Make the fields we do expose _CONST, so the API client can't mess with them.

6 years agorlm_radius_udp: Use PERROR so we get the error reason
Arran Cudbard-Bell [Tue, 3 Mar 2020 22:04:50 +0000 (16:04 -0600)] 
rlm_radius_udp: Use PERROR so we get the error reason

6 years agoschedule: Call module thread detach callbacks before stopping the event loop
Arran Cudbard-Bell [Tue, 3 Mar 2020 20:47:04 +0000 (14:47 -0600)] 
schedule: Call module thread detach callbacks before stopping the event loop

Fixes issue where we see multiple failures in the trunk API caused by the event loop exiting with requests still being processed.

6 years agoradmin fixes for systems without readline. Fixes #3309
Alan T. DeKok [Tue, 3 Mar 2020 20:20:36 +0000 (15:20 -0500)] 
radmin fixes for systems without readline.  Fixes #3309

6 years agorename to more consistent naming scheme, and use fr_vqp
Alan T. DeKok [Tue, 3 Mar 2020 18:44:13 +0000 (13:44 -0500)] 
rename to more consistent naming scheme, and use fr_vqp

instead of vmps

6 years agoconvert API to take explicit ctx and destination vps list
Alan T. DeKok [Tue, 3 Mar 2020 18:25:31 +0000 (13:25 -0500)] 
convert API to take explicit ctx and destination vps list

in preparation for moving to FR_TYPE_GROUP

6 years agoconvert API to take explicit ctx and destination vps list
Alan T. DeKok [Tue, 3 Mar 2020 18:09:25 +0000 (13:09 -0500)] 
convert API to take explicit ctx and destination vps list

in preparation for moving to FR_TYPE_GROUP

6 years agouse fr_radius_decode() in preparation for using FR_TYPE_GROUP
Alan T. DeKok [Tue, 3 Mar 2020 15:39:56 +0000 (10:39 -0500)] 
use fr_radius_decode() in preparation for using FR_TYPE_GROUP

6 years agooriginal can be NULL
Alan T. DeKok [Tue, 3 Mar 2020 15:39:17 +0000 (10:39 -0500)] 
original can be NULL

and if so, use packet vector as the decoding vector.

This changes makes the API easier to understand

6 years agoFix __lsan_default_suppressions() return on FreeBSD
Jorge Pereira [Tue, 3 Mar 2020 01:27:31 +0000 (22:27 -0300)] 
Fix __lsan_default_suppressions() return on FreeBSD

6 years agorlm_radius_udp: Write ID to the log too for help with debugging
Arran Cudbard-Bell [Tue, 3 Mar 2020 17:28:22 +0000 (11:28 -0600)] 
rlm_radius_udp: Write ID to the log too for help with debugging

6 years agoradius/base.c: Fixup docs for fr_radius_sign
Arran Cudbard-Bell [Tue, 3 Mar 2020 17:23:58 +0000 (11:23 -0600)] 
radius/base.c: Fixup docs for fr_radius_sign

6 years agotrack: Use RFC terminiology
Arran Cudbard-Bell [Tue, 3 Mar 2020 17:23:36 +0000 (11:23 -0600)] 
track: Use RFC terminiology

6 years agoMove more code into decode, and document
Arran Cudbard-Bell [Tue, 3 Mar 2020 17:23:07 +0000 (11:23 -0600)] 
Move more code into decode, and document

6 years agorlm_radius_udp: Unused field
Arran Cudbard-Bell [Tue, 3 Mar 2020 17:22:47 +0000 (11:22 -0600)] 
rlm_radius_udp: Unused field

6 years agoshut up stupid compiler
Alan T. DeKok [Tue, 3 Mar 2020 14:32:43 +0000 (09:32 -0500)] 
shut up stupid compiler

6 years agoFix rlm_unix build on FreeBSD
Jorge Pereira [Tue, 3 Mar 2020 02:43:46 +0000 (23:43 -0300)] 
Fix rlm_unix build on FreeBSD

6 years agoAlways initialise code
Arran Cudbard-Bell [Tue, 3 Mar 2020 14:31:07 +0000 (08:31 -0600)] 
Always initialise code

6 years agofixes for -Wunused when there's no readline history. Fixes #3307
Alan T. DeKok [Tue, 3 Mar 2020 13:23:21 +0000 (08:23 -0500)] 
fixes for -Wunused when there's no readline history.  Fixes #3307

6 years agorlm_radius_udp: Fix comparison of integers of different signs (#3305)
Jorge Pereira [Tue, 3 Mar 2020 03:23:33 +0000 (00:23 -0300)] 
rlm_radius_udp: Fix comparison of integers of different signs (#3305)

6 years agocall timegm for UTC times. Fixes #3304
Alan T. DeKok [Tue, 3 Mar 2020 02:09:09 +0000 (21:09 -0500)] 
call timegm for UTC times.  Fixes #3304

https://www.openssl.org/docs/man1.1.0/man3/ASN1_TIME_set_string.html

says:

ASN1_TIME_print() currently does not print out the time zone: it either prints out "GMT" or nothing. But all certificates complying with RFC5280 et al use GMT anyway.

6 years agorlm_radius_udp: Move common decode logic into its own function in preparation for...
Arran Cudbard-Bell [Tue, 3 Mar 2020 00:30:10 +0000 (18:30 -0600)] 
rlm_radius_udp: Move common decode logic into its own function in preparation for adding connection based status checks

6 years agorlm_radius_udp: Move allowed replies array
Arran Cudbard-Bell [Tue, 3 Mar 2020 00:28:51 +0000 (18:28 -0600)] 
rlm_radius_udp: Move allowed replies array

6 years agorlm_radius_udp: Produce log messages on write errors
Arran Cudbard-Bell [Tue, 3 Mar 2020 00:28:24 +0000 (18:28 -0600)] 
rlm_radius_udp: Produce log messages on write errors

Ooops, don't know how these were removed

6 years agoradius: More decode error codes
Arran Cudbard-Bell [Tue, 3 Mar 2020 00:26:19 +0000 (18:26 -0600)] 
radius: More decode error codes

6 years agorlm_radius_udp: Move conn_init
Arran Cudbard-Bell [Mon, 2 Mar 2020 21:19:29 +0000 (15:19 -0600)] 
rlm_radius_udp: Move conn_init

6 years agotrunk: Add last_read_success
Arran Cudbard-Bell [Mon, 2 Mar 2020 21:14:10 +0000 (15:14 -0600)] 
trunk: Add last_read_success

6 years agotrunk: Unused field
Arran Cudbard-Bell [Mon, 2 Mar 2020 15:26:53 +0000 (09:26 -0600)] 
trunk: Unused field

6 years agotrunk: Formatting
Arran Cudbard-Bell [Mon, 2 Mar 2020 15:23:20 +0000 (09:23 -0600)] 
trunk: Formatting

6 years agotrunk: Split FULL and INACTIVE states
Arran Cudbard-Bell [Mon, 2 Mar 2020 15:18:33 +0000 (09:18 -0600)] 
trunk: Split FULL and INACTIVE states

6 years agotrunk: Add back previous functionality to allow requests to be assigned to the backlo...
Arran Cudbard-Bell [Mon, 2 Mar 2020 15:17:17 +0000 (09:17 -0600)] 
trunk: Add back previous functionality to allow requests to be assigned to the backlog if the last event was a connection failure

6 years agotrunk: Prevent assert when req_cleanup_delay == 0
Arran Cudbard-Bell [Mon, 2 Mar 2020 15:05:32 +0000 (09:05 -0600)] 
trunk: Prevent assert when req_cleanup_delay == 0

6 years agorlm_radius: Test plan zombie state
Arran Cudbard-Bell [Mon, 2 Mar 2020 14:28:33 +0000 (08:28 -0600)] 
rlm_radius: Test plan zombie state

6 years agorlm_radius: Start of test plan for rlm_radius (incomplete)
Arran Cudbard-Bell [Mon, 2 Mar 2020 00:52:11 +0000 (18:52 -0600)] 
rlm_radius: Start of test plan for rlm_radius (incomplete)

6 years agorlm_radius_udp: Update comments
Arran Cudbard-Bell [Sun, 1 Mar 2020 20:08:42 +0000 (14:08 -0600)] 
rlm_radius_udp: Update comments

6 years agorlm_radius: status_check singular not plural
Arran Cudbard-Bell [Sun, 1 Mar 2020 19:44:01 +0000 (13:44 -0600)] 
rlm_radius: status_check singular not plural

6 years agorlm_radius_udp: Handle more error codes on failed write
Arran Cudbard-Bell [Sun, 1 Mar 2020 19:42:59 +0000 (13:42 -0600)] 
rlm_radius_udp: Handle more error codes on failed write

6 years agorlm_radius: Fix sanity check order
Arran Cudbard-Bell [Sun, 1 Mar 2020 15:22:25 +0000 (09:22 -0600)] 
rlm_radius: Fix sanity check order

6 years agorlm_chap: Add tests for rlm_chap
Arran Cudbard-Bell [Sat, 29 Feb 2020 21:44:25 +0000 (15:44 -0600)] 
rlm_chap: Add tests for rlm_chap

6 years agorlm_chap: Remove duplicate message detailing the password source
Arran Cudbard-Bell [Sat, 29 Feb 2020 21:43:23 +0000 (15:43 -0600)] 
rlm_chap: Remove duplicate message detailing the password source

6 years agoAdd %{chap_password:} for producing values for CHAP-Password
Arran Cudbard-Bell [Sat, 29 Feb 2020 21:00:25 +0000 (15:00 -0600)] 
Add %{chap_password:} for producing values for CHAP-Password

This is mostly for testing rlm_radius

6 years agoradius: Simplify fr_radius_encode_chap_password and have it accept an input buffer...
Arran Cudbard-Bell [Sat, 29 Feb 2020 20:59:42 +0000 (14:59 -0600)] 
radius: Simplify fr_radius_encode_chap_password and have it accept an input buffer for the password instead of the VP

6 years agoglobal: Use assert not error in MEM()
Arran Cudbard-Bell [Sat, 29 Feb 2020 20:58:21 +0000 (14:58 -0600)] 
global: Use assert not error in MEM()

Means we don't have to provide argumets used by FR_LOG_PREFIX whenever MEM() is used

6 years agothere's no User-Name in a fake packet we just created
Alan T. DeKok [Sat, 29 Feb 2020 15:29:40 +0000 (10:29 -0500)] 
there's no User-Name in a fake packet we just created

6 years agoadd API / wrapper fro fr_pair_group_...() functions
Alan T. DeKok [Sat, 29 Feb 2020 15:24:24 +0000 (10:24 -0500)] 
add API / wrapper fro fr_pair_group_...() functions

so that we can do bulk conversions of the callers *without*
breaking anything.

i.e. convert the callers to use the new API, which (for now)
is just a macro wrapper around the old API.  Then, once the callers
use the new API format, we can delete the macros, and actually use
the real new API functionality.

6 years agofix use of fake / request to be consistent
Alan T. DeKok [Sat, 29 Feb 2020 15:07:51 +0000 (10:07 -0500)] 
fix use of fake / request to be consistent

6 years agouse vp_group for groups
Alan T. DeKok [Fri, 28 Feb 2020 17:49:44 +0000 (12:49 -0500)] 
use vp_group for groups

6 years agouse vp_group for group access
Alan T. DeKok [Fri, 28 Feb 2020 17:48:16 +0000 (12:48 -0500)] 
use vp_group for group access

6 years agoremove unnecessary whitespace
Alan T. DeKok [Fri, 28 Feb 2020 16:07:34 +0000 (11:07 -0500)] 
remove unnecessary whitespace

6 years agoMerge pull request #3298 from jirutka/cui-pgsql
Matthew Newton [Fri, 28 Feb 2020 14:51:55 +0000 (14:51 +0000)] 
Merge pull request #3298 from jirutka/cui-pgsql

Fix and improve cui/postgresql

6 years agospecify name for pkey constraint and use it in query for cui postgresql 3298/head
Jakub Jirutka [Thu, 20 Feb 2020 11:12:09 +0000 (12:12 +0100)] 
specify name for pkey constraint and use it in query for cui postgresql

6 years agouse real upsert (ON CONFLICT) instead of workaround in postgresql cui
Jakub Jirutka [Thu, 20 Feb 2020 00:30:04 +0000 (01:30 +0100)] 
use real upsert (ON CONFLICT) instead of workaround in postgresql cui

Clause ON CONFLICT performs better than the RULE workaround and it's
guaranted to be atomic (the workaround is not).

It requires PostgreSQL 9.5 or newer; this version was released in 2016
and the previous versions are already unsupported, so it shouldn't be
a problem for anyone using latest FreeRADIUS versions.

There's a problem with backward compatibility because ON CONFLICT
doesn't work when there's a RULE ON INSERT defined on the table. It
results in the following error in radius.log:

    Error: rlm_sql_postgresql: 0A000: FEATURE NOT SUPPORTED

6 years agofix postgresql schema for cui
Jakub Jirutka [Thu, 20 Feb 2020 00:12:18 +0000 (01:12 +0100)] 
fix postgresql schema for cui

I'm getting the following error with the current schema:

    rlm_sql_postgresql: 22001: STRING DATA RIGHT TRUNCATION

Moreover, in PostgreSQL the text type is highly preferred above
varchar. Schema for radacct already uses it, so it seems that schema
for cui is just outdated.

I also remove quotes around `now()`, it was probably some archaism.

6 years agofix formatting in cui postgresql schema to be consistent
Jakub Jirutka [Thu, 20 Feb 2020 09:30:50 +0000 (10:30 +0100)] 
fix formatting in cui postgresql schema to be consistent

6 years agouse usec since current second, not usec since epoch
Alan T. DeKok [Fri, 28 Feb 2020 13:10:33 +0000 (08:10 -0500)] 
use usec since current second, not usec since epoch

6 years agofix crash when no previous regex seen
Matthew Newton [Thu, 27 Feb 2020 13:54:59 +0000 (13:54 +0000)] 
fix crash when no previous regex seen

6 years agodoxygen
Matthew Newton [Thu, 27 Feb 2020 13:54:46 +0000 (13:54 +0000)] 
doxygen

6 years agoRemove vp_cursor_t from rlm_radius_udp.c
Arran Cudbard-Bell [Thu, 27 Feb 2020 22:12:39 +0000 (16:12 -0600)] 
Remove vp_cursor_t from rlm_radius_udp.c

6 years agos/pair_cursor/fr_cursor/ in rlm_isc_dhcp.c
Arran Cudbard-Bell [Thu, 27 Feb 2020 22:10:29 +0000 (16:10 -0600)] 
s/pair_cursor/fr_cursor/ in rlm_isc_dhcp.c

6 years agoMore reasonable default
Arran Cudbard-Bell [Thu, 27 Feb 2020 22:06:18 +0000 (16:06 -0600)] 
More reasonable default

6 years agoAdd more log prefixes. Switch some statements to debug/info.
Arran Cudbard-Bell [Thu, 27 Feb 2020 20:42:03 +0000 (14:42 -0600)] 
Add more log prefixes.  Switch some statements to debug/info.

We really do want to see rechability messages in the main server log.

6 years agoTypo
Arran Cudbard-Bell [Thu, 27 Feb 2020 20:25:22 +0000 (14:25 -0600)] 
Typo

6 years agoRemove duplicate track delete call
Arran Cudbard-Bell [Thu, 27 Feb 2020 20:25:15 +0000 (14:25 -0600)] 
Remove duplicate track delete call

6 years agoAssert treq is still assigned to a connection on timeout
Arran Cudbard-Bell [Thu, 27 Feb 2020 20:23:04 +0000 (14:23 -0600)] 
Assert treq is still assigned to a connection on timeout

6 years agoPass in tconn to status_check_next
Arran Cudbard-Bell [Thu, 27 Feb 2020 20:11:24 +0000 (14:11 -0600)] 
Pass in tconn to status_check_next

The timer is now parented of h, so this should all be ok...

6 years agoSignalling request is complete frees everything parented by treq, so probably want...
Arran Cudbard-Bell [Thu, 27 Feb 2020 19:48:30 +0000 (13:48 -0600)] 
Signalling request is complete frees everything parented by treq, so probably want to do it after we're done messing around with it

6 years agoRemove udp_connection_t;
Arran Cudbard-Bell [Thu, 27 Feb 2020 19:36:28 +0000 (13:36 -0600)] 
Remove udp_connection_t;

6 years agouse more standard names "packet" and "reply"
Alan T. DeKok [Thu, 27 Feb 2020 18:43:00 +0000 (13:43 -0500)] 
use more standard names "packet" and "reply"

6 years agouse more standard name "packet"
Alan T. DeKok [Thu, 27 Feb 2020 16:55:58 +0000 (11:55 -0500)] 
use more standard name "packet"

6 years agouse more standard name "packet" and "reply"
Alan T. DeKok [Thu, 27 Feb 2020 16:46:42 +0000 (11:46 -0500)] 
use more standard name "packet" and "reply"

in preparation for moving to type "group" for lists.

6 years agouse more standard name "packet"
Alan T. DeKok [Thu, 27 Feb 2020 16:46:19 +0000 (11:46 -0500)] 
use more standard name "packet"

in preparation for moving to type "group" for lists.

6 years agouse more standard name "packet" instead of "current"
Alan T. DeKok [Thu, 27 Feb 2020 16:45:18 +0000 (11:45 -0500)] 
use more standard name "packet" instead of "current"

in preparation for moving to type "group" for lists.

6 years agofix crash on invalid attribute
Matthew Newton [Thu, 27 Feb 2020 12:38:50 +0000 (12:38 +0000)] 
fix crash on invalid attribute

6 years agouse path count
Alan T. DeKok [Wed, 26 Feb 2020 21:26:25 +0000 (16:26 -0500)] 
use path count

6 years agoremove "set fd handlers" hack now that status checks are in the trunk
Alan T. DeKok [Wed, 26 Feb 2020 21:24:36 +0000 (16:24 -0500)] 
remove "set fd handlers" hack now that status checks are in the trunk

6 years agoPast tense as it's after sendmmsg
Arran Cudbard-Bell [Wed, 26 Feb 2020 21:31:31 +0000 (16:31 -0500)] 
Past tense as it's after sendmmsg