]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agomake fr_value_box_cast more forgiving
Arran Cudbard-Bell [Tue, 5 May 2020 20:48:58 +0000 (15:48 -0500)] 
make fr_value_box_cast more forgiving

i.e. if you request a cast to a bad type produce a run time error instead of asserting.

6 years agoAdd top level lists to the internal dictionary
Arran Cudbard-Bell [Tue, 5 May 2020 20:34:01 +0000 (15:34 -0500)] 
Add top level lists to the internal dictionary

6 years agofill in the reply fields from the request
Alan T. DeKok [Tue, 5 May 2020 16:28:40 +0000 (12:28 -0400)] 
fill in the reply fields from the request

so that the admin only needs to set Sender-Hardware-Address
in the reply, and everything else is filled out automatically

6 years agodocument "active"
Alan T. DeKok [Tue, 5 May 2020 15:00:30 +0000 (11:00 -0400)] 
document "active"

and add notes on filtering only ARP request packets

6 years agoexport constant names for packet codes
Alan T. DeKok [Tue, 5 May 2020 14:22:20 +0000 (10:22 -0400)] 
export constant names for packet codes

6 years agoadd filter option
Alan T. DeKok [Tue, 5 May 2020 14:10:16 +0000 (10:10 -0400)] 
add filter option

6 years agoAdd fr_dbuff_net_from_uint*() and associated tests (#3423)
James Jones [Tue, 5 May 2020 13:35:20 +0000 (08:35 -0500)] 
Add fr_dbuff_net_from_uint*() and associated tests (#3423)

6 years agoRemove explicit frees
Arran Cudbard-Bell [Tue, 5 May 2020 13:18:29 +0000 (08:18 -0500)] 
Remove explicit frees

6 years agoMariaDB sqlippools: New SP that emulates SKIP LOCKED using "user locks"
Terry Burton [Wed, 29 Apr 2020 12:19:27 +0000 (13:19 +0100)] 
MariaDB sqlippools: New SP that emulates SKIP LOCKED using "user locks"

If we're careful we can emulate the SKIP LOCKED pragma by using user locks with
names based on the framedipaddress.

Testing shows greatly improved throughput largely due to preventing thread
starvation under highly concurrent load.

6 years agoradclient: Add test suite
Jorge Pereira [Fri, 1 May 2020 22:38:19 +0000 (19:38 -0300)] 
radclient: Add test suite

6 years agoradclient: Fix the '-s' option
Jorge Pereira [Sun, 3 May 2020 02:44:57 +0000 (23:44 -0300)] 
radclient: Fix the '-s' option

We can't use printf() here, because the stdout is being changed in
fr_log_init()

6 years agoradclient: Add '-C <client_port>' option
Jorge Pereira [Sun, 3 May 2020 00:14:33 +0000 (21:14 -0300)] 
radclient: Add '-C <client_port>' option

It allows the user to specify port number.

6 years agoupdate to use the new v4 virtual servers
Alan T. DeKok [Tue, 5 May 2020 12:54:21 +0000 (08:54 -0400)] 
update to use the new v4 virtual servers

6 years agomake it compile and work better
Alan T. DeKok [Tue, 5 May 2020 12:53:21 +0000 (08:53 -0400)] 
make it compile and work better

6 years agodefine ETH_TYPE_ARP
Alan T. DeKok [Tue, 5 May 2020 12:46:41 +0000 (08:46 -0400)] 
define ETH_TYPE_ARP

6 years agomake it mostly work
Alan T. DeKok [Tue, 5 May 2020 12:32:27 +0000 (08:32 -0400)] 
make it mostly work

compile the processing sections
add proto_arp_ethernet which (for now) just reads packets
no reply is currently sent
various other cleanups and fixes

6 years agowhoops. Opcode is 2 bytes
Alan T. DeKok [Tue, 5 May 2020 12:31:36 +0000 (08:31 -0400)] 
whoops.  Opcode is 2 bytes

6 years agoexpose virtual_server_section_register for public usage
Alan T. DeKok [Tue, 5 May 2020 12:29:34 +0000 (08:29 -0400)] 
expose virtual_server_section_register for public usage

6 years agoremove lower limit on ring buffer messages
Alan T. DeKok [Tue, 5 May 2020 12:23:02 +0000 (08:23 -0400)] 
remove lower limit on ring buffer messages

ARP packets are fixed-size at 28 bytes

6 years agoMake sure _fr_dbuff_init() returns a parentless dbuff (#3422)
James Jones [Tue, 5 May 2020 02:37:54 +0000 (21:37 -0500)] 
Make sure _fr_dbuff_init() returns a parentless dbuff (#3422)

This also adds a test for that property.

6 years agorlm_digest: Don't need 'Digest-' attributes here anymore.
Jorge Pereira [Mon, 4 May 2020 22:33:03 +0000 (19:33 -0300)] 
rlm_digest: Don't need 'Digest-' attributes here anymore.

As we have the 'Digest-*' attributes as TLV and ready in
dictionary.iana, so we don't need that anymore.

6 years agounit_test_module: Don't need 'Digest-' attributes here anymore.
Jorge Pereira [Mon, 4 May 2020 21:35:17 +0000 (18:35 -0300)] 
unit_test_module: Don't need 'Digest-' attributes here anymore.

As we have the 'Digest-*' attributes as TLV and ready in
dictionary.iana, so we don't need that anymore.

6 years agoradclient: Don't need 'Digest-' attributes here anymore.
Jorge Pereira [Mon, 4 May 2020 21:12:55 +0000 (18:12 -0300)] 
radclient: Don't need 'Digest-' attributes here anymore.

As we have the 'Digest-*' attributes as TLV and ready in
dictionary.iana, so we don't need that anymore.

6 years agodictionary.iana: Add missing 'Digest-HA1' attribute
Jorge Pereira [Mon, 4 May 2020 22:32:38 +0000 (19:32 -0300)] 
dictionary.iana: Add missing 'Digest-HA1' attribute

6 years agodigest: Update 'Digest-' attributes as TLV.
Jorge Pereira [Mon, 4 May 2020 21:09:29 +0000 (18:09 -0300)] 
digest: Update 'Digest-' attributes as TLV.

6 years agoradclient: Fix '-x' option (#3420)
Jorge Pereira [Mon, 4 May 2020 20:05:15 +0000 (17:05 -0300)] 
radclient: Fix '-x' option (#3420)

6 years agofix format string
Alan T. DeKok [Mon, 4 May 2020 20:01:10 +0000 (16:01 -0400)] 
fix format string

6 years agoadd proto_arp_process
Alan T. DeKok [Mon, 4 May 2020 19:43:45 +0000 (15:43 -0400)] 
add proto_arp_process

6 years ago'conf' is used
Alan T. DeKok [Mon, 4 May 2020 19:19:55 +0000 (15:19 -0400)] 
'conf' is used

6 years agofirst draft of renewed "proto_arp"
Alan T. DeKok [Mon, 4 May 2020 18:41:02 +0000 (14:41 -0400)] 
first draft of renewed "proto_arp"

It still needs proto_arp_ethernet to open the socket.
and proto_arp_process to process the packets

6 years agorearrange
Alan T. DeKok [Mon, 4 May 2020 17:59:03 +0000 (13:59 -0400)] 
rearrange

6 years agouse request log for request errors, not global log
Alan T. DeKok [Mon, 4 May 2020 17:58:43 +0000 (13:58 -0400)] 
use request log for request errors, not global log

6 years agoadded ARP encoder / decoder, and tests
Alan T. DeKok [Mon, 4 May 2020 16:14:31 +0000 (12:14 -0400)] 
added ARP encoder / decoder, and tests

6 years agosbuff/dbuff return should hold the result in a signed var
Arran Cudbard-Bell [Mon, 4 May 2020 13:32:49 +0000 (08:32 -0500)] 
sbuff/dbuff return should hold the result in a signed var

6 years agouse frame-local talloc ctx
Alan T. DeKok [Sat, 2 May 2020 21:25:30 +0000 (17:25 -0400)] 
use frame-local talloc ctx

Which means that there's no need to free the temporary structures,
as they are cleaned up when the frame exits

6 years agoadd frame-specific talloc_ctx API for modules
Alan T. DeKok [Sat, 2 May 2020 21:23:54 +0000 (17:23 -0400)] 
add frame-specific talloc_ctx API for modules

so that modules can use a talloc ctx which is associated with
the frame, which automatically goes away when the frame is done.

Otherwise, the only option modules have is to use "request".
Which means either they have to be careful about freeing the
allocated memory, OR the memory sticks around until the request
is done.

6 years agoradclient: Fix the output messages (#3418)
Jorge Pereira [Sun, 3 May 2020 01:38:12 +0000 (22:38 -0300)] 
radclient: Fix the output messages (#3418)

6 years agoreturn exit status of EXEC to the caller
Alan T. DeKok [Sat, 2 May 2020 16:54:53 +0000 (12:54 -0400)] 
return exit status of EXEC to the caller

and use it in rlm_exec

6 years agomake mod_exec* fully async
Alan T. DeKok [Sat, 2 May 2020 16:23:14 +0000 (12:23 -0400)] 
make mod_exec* fully async

note that it ignores status2rcode right now.  That needs fixing.

6 years agofix and expose fr_pair_list_afrom_box
Alan T. DeKok [Sat, 2 May 2020 16:08:50 +0000 (12:08 -0400)] 
fix and expose fr_pair_list_afrom_box

6 years agosbuff: Advance stacked sbuffs
Arran Cudbard-Bell [Sat, 2 May 2020 01:15:04 +0000 (20:15 -0500)] 
sbuff: Advance stacked sbuffs

6 years agodict: Move a subset of dict functions to use sbuffs
Arran Cudbard-Bell [Sat, 2 May 2020 01:08:48 +0000 (20:08 -0500)] 
dict: Move a subset of dict functions to use sbuffs

6 years agosbuff: Bring more inline with dbuffs
Arran Cudbard-Bell [Sat, 2 May 2020 01:08:07 +0000 (20:08 -0500)] 
sbuff: Bring more inline with dbuffs

Start adding support for stream parsing

6 years agodbuff: Don't automatically reference compound literals
Arran Cudbard-Bell [Sat, 2 May 2020 00:47:35 +0000 (19:47 -0500)] 
dbuff: Don't automatically reference compound literals

Means we can't use the macros to initialise structures on the stack.

6 years agomake exec async when there's no output pairs
Alan T. DeKok [Fri, 1 May 2020 20:44:57 +0000 (16:44 -0400)] 
make exec async when there's no output pairs

6 years ago:mute: shut up compiler (#3417)
Jorge Pereira [Fri, 1 May 2020 20:23:25 +0000 (17:23 -0300)] 
:mute: shut up compiler (#3417)

6 years agoadd missing argument
Alan T. DeKok [Fri, 1 May 2020 20:11:36 +0000 (16:11 -0400)] 
add missing argument

6 years agouse variable...
Alan T. DeKok [Fri, 1 May 2020 20:06:16 +0000 (16:06 -0400)] 
use variable...

6 years agotmpl: Fix minor leak (#3416)
Jorge Pereira [Fri, 1 May 2020 20:08:04 +0000 (17:08 -0300)] 
tmpl: Fix minor leak (#3416)

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

6 years agoRemaining is better than freespace as it works for printing and parsing
Arran Cudbard-Bell [Fri, 1 May 2020 19:46:02 +0000 (14:46 -0500)] 
Remaining is better than freespace as it works for printing and parsing

6 years agostronger validations for nested maps
Alan T. DeKok [Fri, 1 May 2020 19:41:57 +0000 (15:41 -0400)] 
stronger validations for nested maps

6 years agovalue: Simplify
Arran Cudbard-Bell [Fri, 1 May 2020 19:25:11 +0000 (14:25 -0500)] 
value: Simplify

6 years agoadd input VPs to asynchronous tmpl expansion.
Alan T. DeKok [Thu, 30 Apr 2020 20:41:39 +0000 (16:41 -0400)] 
add input VPs to asynchronous tmpl expansion.

It's only used for TMPL_TYPE_EXEC, but it's still useful

6 years agoalways preparse EXEC templates
Alan T. DeKok [Thu, 30 Apr 2020 19:22:18 +0000 (15:22 -0400)] 
always preparse EXEC templates

so we don't need to do it in the unlang compiler
and we can run async xlats in the map_proc interpreter

6 years agowe don't need this code
Alan T. DeKok [Thu, 30 Apr 2020 19:03:37 +0000 (15:03 -0400)] 
we don't need this code

6 years agoclarify comments
Alan T. DeKok [Fri, 1 May 2020 16:22:08 +0000 (12:22 -0400)] 
clarify comments

6 years agosort the files, so that they are (mostly) run in order.
Alan T. DeKok [Thu, 30 Apr 2020 19:18:50 +0000 (15:18 -0400)] 
sort the files, so that they are (mostly) run in order.

There is still a "depends.mk" file which tracks inter-file
dependencies.  But it's much easier to read the output when the
files are in non-random order.

6 years agoshhh gcc
Arran Cudbard-Bell [Fri, 1 May 2020 16:08:52 +0000 (11:08 -0500)] 
shhh gcc

6 years agovalue: More fixes
Arran Cudbard-Bell [Fri, 1 May 2020 15:53:19 +0000 (10:53 -0500)] 
value: More fixes

6 years agoUse the correct hton function for 64 bit dates
Arran Cudbard-Bell [Fri, 1 May 2020 15:41:24 +0000 (10:41 -0500)] 
Use the correct hton function for 64 bit dates

6 years agovalue: Use integer range macros
Arran Cudbard-Bell [Fri, 1 May 2020 15:40:53 +0000 (10:40 -0500)] 
value: Use integer range macros

6 years agomove async map code to its own source file
Arran Cudbard-Bell [Fri, 1 May 2020 15:36:19 +0000 (10:36 -0500)] 
move async map code to its own source file

6 years agoradclient: Fix '-s' summary option
Jorge Pereira [Fri, 1 May 2020 00:05:20 +0000 (21:05 -0300)] 
radclient: Fix '-s' summary option

6 years agoradclient: Some fixes (#3414)
Jorge Pereira [Fri, 1 May 2020 14:18:12 +0000 (11:18 -0300)] 
radclient: Some fixes (#3414)

* radclient: Just use 'ipproto'

* radclient: Typo

* radclient: errors should be 'return -1'

* radclient: The '-c' value should be >= 1

If we pass '-c 0' causes an infinity loop.

* radclient: Fix issue with '-c N' parameter

So, if the (request->id == -1), let's create the packet.
It fixes the current issue to send multiple packets correctly.

* radclient: Fix the timestamp checks for handle the packets

6 years agoFix non-debug builds in event.c
Arran Cudbard-Bell [Fri, 1 May 2020 14:07:46 +0000 (09:07 -0500)] 
Fix non-debug builds in event.c

6 years agoevent: More dbugging
Arran Cudbard-Bell [Fri, 1 May 2020 02:00:23 +0000 (21:00 -0500)] 
event: More dbugging

6 years agorlm_always: xlat for setting module status via unlang (#3404)
Terry Burton [Thu, 30 Apr 2020 23:23:45 +0000 (00:23 +0100)] 
rlm_always: xlat for setting module status via unlang (#3404)

* rlm_always: xlat for setting module status and rcode via unlang

Parity with: radmin -e 'set module status db_status
{alive,ok,fail,notfound,...}'

* resource-check virtual server for triggering control flow updates

6 years agoConvert internal protocol encode to use dbuff (#3413)
James Jones [Thu, 30 Apr 2020 20:54:09 +0000 (15:54 -0500)] 
Convert internal protocol encode to use dbuff (#3413)

* Convert internal protocol encode to use dbuff

Ultimately, we will switch generally from passing around ptr/length
to using dbuffs. Doing it in stages means the following:

- the outside interface (and inside via test points) will only
  change once, at the end
- because of that, and because of common functions called by
  various protocols' code (e.g. fr_value_box_to_network()) means
  there will be wrappers that ultimately go away or become the
  official versions (e.g. fr_value_box_to_network_dbuff() and
  fr_internal_encode_pair_dbuff())

The layout and time's arrow combine to give internal_encode()
two alternatives:

- copying data only when it's known, at a cost in time and memory
  for copying some data twice
- modifying and/or moving already-written data (e.g filling in
  fields in the first encoding byte when they're known, or moving
  encoded data when it turns out to be longer than 255 bytes so
  that the length can be stored)

internal_encode() has done the latter in the past, and this version
sticks with it by noting dbuff->p's value before fr_dbuff_mem*()ing
in things it may want to overwrite or move.

* Wrap with parenthesis

Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
6 years agotypo
Arran Cudbard-Bell [Thu, 30 Apr 2020 17:12:15 +0000 (12:12 -0500)] 
typo

6 years agovalue: Children of the argv array should be parented by the array
Arran Cudbard-Bell [Thu, 30 Apr 2020 17:07:33 +0000 (12:07 -0500)] 
value: Children of the argv array should be parented by the array

Or at least the caller seems to assume that...

6 years agovalue: Temporary boxes can be on the stack
Arran Cudbard-Bell [Thu, 30 Apr 2020 17:07:02 +0000 (12:07 -0500)] 
value: Temporary boxes can be on the stack

6 years agoevent: Pass back opaque pointer for fd event
Arran Cudbard-Bell [Thu, 30 Apr 2020 16:50:55 +0000 (11:50 -0500)] 
event: Pass back opaque pointer for fd event

6 years agoNULL is better than zero
Alan T. DeKok [Thu, 30 Apr 2020 11:16:49 +0000 (07:16 -0400)] 
NULL is better than zero

6 years agoinitialize variable
Alan T. DeKok [Thu, 30 Apr 2020 11:12:12 +0000 (07:12 -0400)] 
initialize variable

6 years agoif there's no TLS, skip tests which need TLS
Alan T. DeKok [Thu, 30 Apr 2020 01:59:22 +0000 (21:59 -0400)] 
if there's no TLS, skip tests which need TLS

6 years agomake exec async on the RHS of maps
Alan T. DeKok [Thu, 30 Apr 2020 01:22:03 +0000 (21:22 -0400)] 
make exec async on the RHS of maps

And fix unit test to be correct.

6 years agotypo
Alan T. DeKok [Thu, 30 Apr 2020 01:21:42 +0000 (21:21 -0400)] 
typo

6 years agounescape quoted strings which will be passed to exec()
Alan T. DeKok [Thu, 30 Apr 2020 01:21:14 +0000 (21:21 -0400)] 
unescape quoted strings which will be passed to exec()

6 years agoAdd destructor so we can set a breakpoint for state ctx freeing
Arran Cudbard-Bell [Thu, 30 Apr 2020 01:18:22 +0000 (20:18 -0500)] 
Add destructor so we can set a breakpoint for state ctx freeing

6 years agoconstify session-state name and add comments
Arran Cudbard-Bell [Thu, 30 Apr 2020 01:06:12 +0000 (20:06 -0500)] 
constify session-state name and add comments

6 years agoinstruments
Arran Cudbard-Bell [Thu, 30 Apr 2020 00:37:22 +0000 (19:37 -0500)] 
instruments

6 years agoAssert we've not previously allocated status resources
Arran Cudbard-Bell [Wed, 29 Apr 2020 23:35:38 +0000 (18:35 -0500)] 
Assert we've not previously allocated status resources

6 years agoBe more verbose about why we couldn't send packets to workers
Arran Cudbard-Bell [Wed, 29 Apr 2020 23:35:24 +0000 (18:35 -0500)] 
Be more verbose about why we couldn't send packets to workers

6 years agoPrint the onload return code in debug builds
Arran Cudbard-Bell [Wed, 29 Apr 2020 22:49:52 +0000 (17:49 -0500)] 
Print the onload return code in debug builds

6 years agoPrint any errors on the error stack if onload fails
Arran Cudbard-Bell [Wed, 29 Apr 2020 20:16:36 +0000 (15:16 -0500)] 
Print any errors on the error stack if onload fails

6 years agoRaise debug level for "optimizing" debug statements
Arran Cudbard-Bell [Wed, 29 Apr 2020 20:16:23 +0000 (15:16 -0500)] 
Raise debug level for "optimizing" debug statements

6 years agoadd and document "repeat" functionality
Alan T. DeKok [Wed, 29 Apr 2020 19:58:32 +0000 (15:58 -0400)] 
add and document "repeat" functionality

6 years agomake LHS exec async
Alan T. DeKok [Wed, 29 Apr 2020 18:47:02 +0000 (14:47 -0400)] 
make LHS exec async

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

6 years agoUse the immutable pointers
Arran Cudbard-Bell [Wed, 29 Apr 2020 15:14:16 +0000 (10:14 -0500)] 
Use the immutable pointers

6 years agocheck for enumv->name here, too
Alan T. DeKok [Wed, 29 Apr 2020 13:39:44 +0000 (09:39 -0400)] 
check for enumv->name here, too

6 years agoinitialize more fields, and check for in-line enumvs
Alan T. DeKok [Wed, 29 Apr 2020 13:26:52 +0000 (09:26 -0400)] 
initialize more fields, and check for in-line enumvs

6 years agointernal-encode: Stop compiler complaints for debug builds
Arran Cudbard-Bell [Tue, 28 Apr 2020 22:26:04 +0000 (17:26 -0500)] 
internal-encode: Stop compiler complaints for debug builds

6 years agotrunk: Fix enqueue_on_connection to re-calculate the connection/request ratio
Arran Cudbard-Bell [Tue, 28 Apr 2020 22:20:04 +0000 (17:20 -0500)] 
trunk: Fix enqueue_on_connection to re-calculate the connection/request ratio

6 years agoReally can't happen
Arran Cudbard-Bell [Tue, 28 Apr 2020 22:04:15 +0000 (17:04 -0500)] 
Really can't happen

6 years agodecode the amount of data we have, not the maximum size of the buffer
Arran Cudbard-Bell [Tue, 28 Apr 2020 21:53:18 +0000 (16:53 -0500)] 
decode the amount of data we have, not the maximum size of the buffer

6 years agoDon't need to pass el
Arran Cudbard-Bell [Tue, 28 Apr 2020 19:54:32 +0000 (14:54 -0500)] 
Don't need to pass el

6 years agoAdjust value_field in internal_encode() if flen > 1 (#3409)
James Jones [Tue, 28 Apr 2020 16:29:25 +0000 (11:29 -0500)] 
Adjust value_field in internal_encode() if flen > 1 (#3409)

When internal_encode() loses its bet that there will be less than
256 bytes of encoded data, the header must grow to hold the length
and the data moved to make room. When that happens, value_field
has to be adjusted to match--otherwise, the FR_PROTO_HEX_DUMP() of
the header won't show the entire header.

6 years agotrunk: Change some trunk debug messages from DEBUG4 to DEBUG3
Arran Cudbard-Bell [Tue, 28 Apr 2020 16:18:35 +0000 (11:18 -0500)] 
trunk: Change some trunk debug messages from DEBUG4 to DEBUG3

6 years agoAlways need to re-calculate
Arran Cudbard-Bell [Tue, 28 Apr 2020 15:58:15 +0000 (10:58 -0500)] 
Always need to re-calculate