]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
3 years agoRemove more rlm_sql prefixes
Arran Cudbard-Bell [Thu, 17 Mar 2022 13:44:53 +0000 (09:44 -0400)] 
Remove more rlm_sql prefixes

3 years agoit helps to check if there's room for the header.
Alan T. DeKok [Wed, 16 Mar 2022 14:27:01 +0000 (10:27 -0400)] 
it helps to check if there's room for the header.

3 years agoallow fixed-width string/octet types in an array
Alan T. DeKok [Wed, 16 Mar 2022 13:41:51 +0000 (09:41 -0400)] 
allow fixed-width string/octet types in an array

3 years agoallow decoding of arrays of fixed-size string/octets
Alan T. DeKok [Wed, 16 Mar 2022 13:39:19 +0000 (09:39 -0400)] 
allow decoding of arrays of fixed-size string/octets

not sure if the dicts support it, but what the heck

3 years agouse new functions, and make more like dhcpv6
Alan T. DeKok [Wed, 16 Mar 2022 13:37:20 +0000 (09:37 -0400)] 
use new functions, and make more like dhcpv6

3 years agoadd fr_dhcpv4_attr_sizes[] and fr_dhcpv4_option_len()
Alan T. DeKok [Wed, 16 Mar 2022 13:37:01 +0000 (09:37 -0400)] 
add fr_dhcpv4_attr_sizes[] and fr_dhcpv4_option_len()

3 years agoencode bools properly
Alan T. DeKok [Tue, 15 Mar 2022 21:24:17 +0000 (17:24 -0400)] 
encode bools properly

adding fr_dhcpv4_next_encodable, and updating encode_value()

the decoder was already correct.

3 years agoadd struct decoding
Alan T. DeKok [Tue, 15 Mar 2022 18:16:12 +0000 (14:16 -0400)] 
add struct decoding

3 years agostart of the tree list API
Alan T. DeKok [Tue, 15 Mar 2022 17:50:21 +0000 (13:50 -0400)] 
start of the tree list API

3 years agoallow for exact decoding of values.
Alan T. DeKok [Tue, 15 Mar 2022 13:54:53 +0000 (09:54 -0400)] 
allow for exact decoding of values.

if we expect a byte and we get 4 bytes, then it should be a raw
option.

3 years agofix fr_dhcpv4_decode_option to return the correct values
Alan T. DeKok [Tue, 15 Mar 2022 13:42:10 +0000 (09:42 -0400)] 
fix fr_dhcpv4_decode_option to return the correct values

we don't return the length of the decoded data, we return
however much we decoded in one option.

3 years agoAllow string/octet "arrays" with length=uint8 (#4415)
James Jones [Tue, 15 Mar 2022 12:13:44 +0000 (07:13 -0500)] 
Allow string/octet "arrays" with length=uint8 (#4415)

This is the DHCPv4 analog of 64ea2f5, the analogous DHCPv6 change.

3 years agoci-rpm: Fix packages.endpointdev.com URL (#4414)
Jorge Pereira [Mon, 14 Mar 2022 19:24:08 +0000 (16:24 -0300)] 
ci-rpm: Fix packages.endpointdev.com URL (#4414)

Needed by Centos-7 CI Building when installing https://packages.endpointdev.com/rhel/7/os/x86_64/git-core-2.24.1-1.ep7.x86_64.rpm

3 years agorework to be more like other protocols
Alan T. DeKok [Mon, 14 Mar 2022 13:14:38 +0000 (09:14 -0400)] 
rework to be more like other protocols

we really need to move this repetitive code into common functions

3 years agoupdate comments
Alan T. DeKok [Sun, 13 Mar 2022 11:56:36 +0000 (07:56 -0400)] 
update comments

3 years agoit helps to check for overflow
Alan T. DeKok [Sun, 13 Mar 2022 10:52:33 +0000 (06:52 -0400)] 
it helps to check for overflow

3 years agoport decode_raw() over from dhcpv6
Alan T. DeKok [Sat, 12 Mar 2022 15:56:07 +0000 (10:56 -0500)] 
port decode_raw() over from dhcpv6

which involves adding a tmp_ctx to packet_ctx

ensuring that all functions have a decode_ctx passed to them

fixing up the calls to decode_raw() to pass the correct values

fixing the test output so that it shows the current attribute
as raw, and not something else.

3 years agonow that the decoder is fixed, fix the encoder
Alan T. DeKok [Sat, 12 Mar 2022 15:21:10 +0000 (10:21 -0500)] 
now that the decoder is fixed, fix the encoder

so that it mashes the values together

3 years agoautomatically coalesce values across multiple options
Alan T. DeKok [Sat, 12 Mar 2022 15:19:33 +0000 (10:19 -0500)] 
automatically coalesce values across multiple options

3 years agopass non-NULL decode ctx to decode option function
Alan T. DeKok [Sat, 12 Mar 2022 15:04:51 +0000 (10:04 -0500)] 
pass non-NULL decode ctx to decode option function

3 years agocall encode_array
Alan T. DeKok [Sat, 12 Mar 2022 14:44:22 +0000 (09:44 -0500)] 
call encode_array

3 years agodon't loop over values for VSAs
Alan T. DeKok [Fri, 11 Mar 2022 13:16:39 +0000 (08:16 -0500)] 
don't loop over values for VSAs

3 years agohack up encode_array() to not cross option boundaries
Alan T. DeKok [Fri, 11 Mar 2022 12:53:57 +0000 (07:53 -0500)] 
hack up encode_array() to not cross option boundaries

this really needs to be fixed in the decoder

3 years agocall extend_option()
Alan T. DeKok [Thu, 10 Mar 2022 22:40:27 +0000 (17:40 -0500)] 
call extend_option()

which shows that decoding needs to be fixed, too

3 years agoget network length, which is a bit different...
Alan T. DeKok [Thu, 10 Mar 2022 22:35:06 +0000 (17:35 -0500)] 
get network length, which is a bit different...

IPv6 has 16 bytes minimum, 17 max (for scope I guess).
We're not going to copy fr_dhcpv6_option_len() as yet, so we
just hack something for now.

3 years agocopy encode_array() from dhcpv6
Alan T. DeKok [Thu, 10 Mar 2022 22:22:22 +0000 (17:22 -0500)] 
copy encode_array() from dhcpv6

- comment out dns_labels for now
- use vp->vp_length instead of fr_dhcpv6_option_len()
  we'll fix that later.
- use 8-bit length for string/octets, instead of 16-bit

It still doesn't split "too long" options but that can come next

3 years agoloop over input VPs.
Alan T. DeKok [Thu, 10 Mar 2022 22:15:51 +0000 (17:15 -0500)] 
loop over input VPs.

we don't call extend_option() yet.  Just cleaning up

3 years agostart of cleanup
Alan T. DeKok [Thu, 10 Mar 2022 22:08:40 +0000 (17:08 -0500)] 
start of cleanup

the code is better, but the tests don't pass.  dhcpv4 requires
multiple of the same pair_t to be encoded in the same option

3 years agov4: Two small fixes for LDAP reconnect when bind fails (#4412)
Nick Porter [Fri, 11 Mar 2022 14:27:30 +0000 (14:27 +0000)] 
v4: Two small fixes for LDAP reconnect when bind fails (#4412)

* Don't return members of a freed structure

* Add reconnection_delay to rlm_ldap

So that incorrect bind credentials don't result in a spinning
connection.

3 years agoallow fixed-size data types to have "array" flag, too
Alan T. DeKok [Fri, 11 Mar 2022 14:06:12 +0000 (09:06 -0500)] 
allow fixed-size data types to have "array" flag, too

3 years agocheck for key fields, not for bit fields
Alan T. DeKok [Thu, 10 Mar 2022 22:50:25 +0000 (17:50 -0500)] 
check for key fields, not for bit fields

3 years agowe're going to do dynamic clients a different way
Alan T. DeKok [Thu, 10 Mar 2022 13:21:47 +0000 (08:21 -0500)] 
we're going to do dynamic clients a different way

so remove the knowledge that packet_ctx is anything at all

3 years ago%{bin: } xlat - adjust length of string when removing initial 0x (#4408)
Nick Porter [Wed, 9 Mar 2022 15:35:33 +0000 (15:35 +0000)] 
%{bin: } xlat - adjust length of string when removing initial 0x (#4408)

3 years agoLet da_is_length_field() recognize uint8 lengths (#4406)
James Jones [Wed, 9 Mar 2022 12:21:46 +0000 (06:21 -0600)] 
Let da_is_length_field() recognize uint8 lengths (#4406)

3 years agoensure that string/octet arrays are marked as "length=uint16"
Alan T. DeKok [Tue, 8 Mar 2022 21:44:42 +0000 (16:44 -0500)] 
ensure that string/octet arrays are marked as "length=uint16"

3 years agoadd 'length=uint16' here, too
Alan T. DeKok [Tue, 8 Mar 2022 21:43:54 +0000 (16:43 -0500)] 
add 'length=uint16' here, too

3 years agominor cleanups
Alan T. DeKok [Tue, 8 Mar 2022 20:51:44 +0000 (15:51 -0500)] 
minor cleanups

use correct da_is_length_field() macro
"too long" data isn't an assert.  It's a "can't encode" error

3 years agoUNUSED
Alan T. DeKok [Mon, 7 Mar 2022 15:43:55 +0000 (10:43 -0500)] 
UNUSED

3 years agoadd 'length=uint8'
Alan T. DeKok [Mon, 7 Mar 2022 14:15:26 +0000 (09:15 -0500)] 
add 'length=uint8'

3 years agothis is bool
Alan T. DeKok [Sun, 6 Mar 2022 12:44:42 +0000 (07:44 -0500)] 
this is bool

3 years agodouble-check flags for "length=uint16,array"
Alan T. DeKok [Fri, 4 Mar 2022 20:46:44 +0000 (15:46 -0500)] 
double-check flags for "length=uint16,array"

to tighten up the restrictions a bit, and to make the dictionaries
more explicit

3 years agothese are arrays of string/octet, prefixed with a 16-bit length
Alan T. DeKok [Fri, 4 Mar 2022 20:03:40 +0000 (15:03 -0500)] 
these are arrays of string/octet, prefixed with a 16-bit length

the use of the "array" flag causes the DHCPv6 encoder to automatically
prefix the variable length strings with a 16-bit length.  But it
doesn't hurt to have this information explicit in the dictionaries too

3 years agoFix Centos 8 CI build and enable Rocky 8 (#4399)
Jorge Pereira [Fri, 4 Mar 2022 14:36:40 +0000 (11:36 -0300)] 
Fix Centos 8 CI build and enable Rocky 8 (#4399)

* Fix Centos 8 CI build

* Enable Rocky 8 CI build

As the Centos 8 is EOL. Let's also consider see if the build is ok on
Rocky 8.

3 years agoAdd fr_trunk_verify() and FR_TRUNK_VERIFY() to assist with detecting trunk issues...
James Jones [Fri, 4 Mar 2022 14:09:49 +0000 (08:09 -0600)] 
Add fr_trunk_verify() and FR_TRUNK_VERIFY() to assist with detecting trunk issues. (#4379)

3 years agoMinor text fix in LDAP module comments (#4405)
Sudheer Satyanarayana [Fri, 4 Mar 2022 13:25:12 +0000 (18:55 +0530)] 
Minor text fix in LDAP module comments (#4405)

removed redundant word

3 years agoCorrect heap talloc types
Arran Cudbard-Bell [Fri, 4 Mar 2022 00:22:59 +0000 (18:22 -0600)] 
Correct heap talloc types

3 years agoAllow heap access functions to be inlined
Arran Cudbard-Bell [Thu, 3 Mar 2022 23:45:46 +0000 (17:45 -0600)] 
Allow heap access functions to be inlined

Heaps hold the thread specific data for xlats, and will do the same for modules, so it's good to try and make them as cheap to access as possible.

3 years agoAdd common fields to the proto modules
Arran Cudbard-Bell [Thu, 3 Mar 2022 20:50:48 +0000 (14:50 -0600)] 
Add common fields to the proto modules

3 years agoFix spurious debug message
Arran Cudbard-Bell [Thu, 3 Mar 2022 03:31:46 +0000 (21:31 -0600)] 
Fix spurious debug message

3 years agoFix build errors in cassandra
Arran Cudbard-Bell [Thu, 3 Mar 2022 03:31:35 +0000 (21:31 -0600)] 
Fix build errors in cassandra

3 years agoCast data not inst in sql drivers
Arran Cudbard-Bell [Thu, 3 Mar 2022 03:17:43 +0000 (21:17 -0600)] 
Cast data not inst in sql drivers

3 years agoNeed to bootstrap sqlite _before_ rlm_sql does instantiation and creates the pool
Arran Cudbard-Bell [Thu, 3 Mar 2022 03:12:36 +0000 (21:12 -0600)] 
Need to bootstrap sqlite _before_ rlm_sql does instantiation and creates the pool

3 years agoUse common submodule CONF_PARSER code for loading submodules
Arran Cudbard-Bell [Thu, 3 Mar 2022 01:38:39 +0000 (19:38 -0600)] 
Use common submodule CONF_PARSER code for loading submodules

3 years agoUse the common submodule infrastructure for rlm_sql
Arran Cudbard-Bell [Thu, 3 Mar 2022 00:17:51 +0000 (18:17 -0600)] 
Use the common submodule infrastructure for rlm_sql

This gives us thread instantiation/detach for sql drivers

3 years agoSplit conf parsing phase off from dl instantiation
Arran Cudbard-Bell [Thu, 3 Mar 2022 00:08:47 +0000 (18:08 -0600)] 
Split conf parsing phase off from dl instantiation

This lets us get the instance data in all the appropriate trees before running CONF_PARSER callbacks

3 years agoProvide accessor to get dl_inst from conf
Arran Cudbard-Bell [Thu, 3 Mar 2022 00:07:06 +0000 (18:07 -0600)] 
Provide accessor to get dl_inst from conf

3 years agoCall detach on shallowest parent first
Arran Cudbard-Bell [Thu, 3 Mar 2022 00:04:20 +0000 (18:04 -0600)] 
Call detach on shallowest parent first

3 years agoFix whitespace
Arran Cudbard-Bell [Thu, 3 Mar 2022 00:03:51 +0000 (18:03 -0600)] 
Fix whitespace

3 years agoSwitch rlm_radius to using the high level submodule interface
Arran Cudbard-Bell [Wed, 2 Mar 2022 21:21:22 +0000 (15:21 -0600)] 
Switch rlm_radius to using the high level submodule interface

Really this is part of the previous commit, but broken out for ease of examination if we run into problems later.

3 years agoUse module_t as the common set of fields in loadable modules
Arran Cudbard-Bell [Wed, 2 Mar 2022 21:18:50 +0000 (15:18 -0600)] 
Use module_t as the common set of fields in loadable modules

3 years agoSplit module_rlm functions out into a separate header file
Arran Cudbard-Bell [Wed, 2 Mar 2022 15:36:29 +0000 (09:36 -0600)] 
Split module_rlm functions out into a separate header file

3 years agoExplicitly pass in the type of module we're loading to module_bootstrap
Arran Cudbard-Bell [Wed, 2 Mar 2022 14:57:25 +0000 (08:57 -0600)] 
Explicitly pass in the type of module we're loading to module_bootstrap

3 years agoTypo
Arran Cudbard-Bell [Wed, 2 Mar 2022 14:11:53 +0000 (08:11 -0600)] 
Typo

3 years agoSplit out rlm module code from modules.c
Arran Cudbard-Bell [Wed, 2 Mar 2022 00:03:48 +0000 (18:03 -0600)] 
Split out rlm module code from modules.c

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Tue, 1 Mar 2022 09:34:49 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Tue, 1 Mar 2022 09:34:43 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Tue, 1 Mar 2022 09:34:40 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Tue, 1 Mar 2022 09:34:36 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Tue, 1 Mar 2022 09:34:33 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Tue, 1 Mar 2022 09:34:31 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Tue, 1 Mar 2022 09:34:28 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Tue, 1 Mar 2022 09:34:21 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar

3 years agoZero out input buffer on reset in internal md5
Arran Cudbard-Bell [Wed, 23 Feb 2022 16:05:05 +0000 (11:05 -0500)] 
Zero out input buffer on reset in internal md5

3 years agouse all pre-allocated MD5 ctxs to reduce OpenSSL malloc/free noise
Arran Cudbard-Bell [Tue, 22 Feb 2022 21:46:54 +0000 (16:46 -0500)] 
use all pre-allocated MD5 ctxs to reduce OpenSSL malloc/free noise

3 years agoAdd atexit state function
Arran Cudbard-Bell [Tue, 22 Feb 2022 20:30:12 +0000 (15:30 -0500)] 
Add atexit state function

3 years agoExplicitly cleanup "thread local" memory in single threaded mode
Arran Cudbard-Bell [Sat, 19 Feb 2022 04:50:01 +0000 (23:50 -0500)] 
Explicitly cleanup "thread local" memory in single threaded mode

3 years agocheck length before using it. Fixes fuzzer
Alan T. DeKok [Fri, 18 Feb 2022 13:31:31 +0000 (08:31 -0500)] 
check length before using it.  Fixes fuzzer

3 years agomore "shut up clang analyzer"
Alan T. DeKok [Thu, 17 Feb 2022 21:51:51 +0000 (16:51 -0500)] 
more "shut up clang analyzer"

3 years agoshut up static analyzer
Alan T. DeKok [Thu, 17 Feb 2022 15:31:45 +0000 (10:31 -0500)] 
shut up static analyzer

3 years agoremove "peek-ahead" da and type
Alan T. DeKok [Thu, 17 Feb 2022 13:56:55 +0000 (08:56 -0500)] 
remove "peek-ahead" da and type

and other minor cleanups

3 years agoadd "make test.unit.xlat"
Alan T. DeKok [Thu, 17 Feb 2022 13:53:07 +0000 (08:53 -0500)] 
add "make test.unit.xlat"

3 years agoFix multiple issues with clearing failed TLS sessions
Arran Cudbard-Bell [Thu, 17 Feb 2022 00:50:27 +0000 (19:50 -0500)] 
Fix multiple issues with clearing failed TLS sessions

3 years agoUnused
Arran Cudbard-Bell [Wed, 16 Feb 2022 16:48:56 +0000 (11:48 -0500)] 
Unused

3 years agoWhitespace
Arran Cudbard-Bell [Wed, 16 Feb 2022 05:30:41 +0000 (00:30 -0500)] 
Whitespace

3 years agoHelps if these are the right way round
Arran Cudbard-Bell [Tue, 15 Feb 2022 03:38:55 +0000 (22:38 -0500)] 
Helps if these are the right way round

3 years agoPrint out when a SSL * is bound and unbound
Arran Cudbard-Bell [Tue, 15 Feb 2022 03:34:55 +0000 (22:34 -0500)] 
Print out when a SSL * is bound and unbound

3 years agoFix up references to vector attributes
Arran Cudbard-Bell [Tue, 15 Feb 2022 00:18:58 +0000 (19:18 -0500)] 
Fix up references to vector attributes

3 years agoRemove references to EAP-SIM-*
Arran Cudbard-Bell [Tue, 15 Feb 2022 00:13:08 +0000 (19:13 -0500)] 
Remove references to EAP-SIM-*

3 years agoDefault to the first method in the NAK list
Arran Cudbard-Bell [Mon, 14 Feb 2022 23:46:53 +0000 (18:46 -0500)] 
Default to the first method in the NAK list

3 years agoSupport dynamically configuring more than one acceptable EAP method
Arran Cudbard-Bell [Mon, 14 Feb 2022 23:16:54 +0000 (18:16 -0500)] 
Support dynamically configuring more than one acceptable EAP method

This is needed for EAP-SIM/AKA/AKA'

3 years agoAllow SIM-Start packets without identity requests
Arran Cudbard-Bell [Fri, 11 Feb 2022 17:47:07 +0000 (12:47 -0500)] 
Allow SIM-Start packets without identity requests

Unsure why/when this would be useful, but it's needed for completeness.

3 years agosession-id is now ambiguous, use the correct one
Arran Cudbard-Bell [Fri, 11 Feb 2022 17:46:27 +0000 (12:46 -0500)] 
session-id is now ambiguous, use the correct one

3 years agoAlways run EAP-SIM-START for EAP-SIM
Arran Cudbard-Bell [Fri, 11 Feb 2022 15:49:44 +0000 (10:49 -0500)] 
Always run EAP-SIM-START for EAP-SIM

It's useless legacy cruft, EAP-AKA and EAP-AKA' don't require it.

3 years agotry to quiet clang
Alan T. DeKok [Thu, 10 Feb 2022 18:57:51 +0000 (13:57 -0500)] 
try to quiet clang

3 years agoMinor fixes
Arran Cudbard-Bell [Thu, 10 Feb 2022 18:42:42 +0000 (13:42 -0500)] 
Minor fixes

3 years agoDefine the set of case statements for fr_type_signed too
Arran Cudbard-Bell [Thu, 10 Feb 2022 18:42:26 +0000 (13:42 -0500)] 
Define the set of case statements for fr_type_signed too

3 years agoadd fr_type_is_signed()
Alan T. DeKok [Thu, 10 Feb 2022 15:44:49 +0000 (10:44 -0500)] 
add fr_type_is_signed()

3 years agouse correct variable
Alan T. DeKok [Thu, 10 Feb 2022 15:38:59 +0000 (10:38 -0500)] 
use correct variable

3 years agoremove RPEDEBUG in xlat_eval_sync function
Alan T. DeKok [Thu, 10 Feb 2022 14:48:08 +0000 (09:48 -0500)] 
remove RPEDEBUG in xlat_eval_sync function

all callers have multiple paths where they return an error
via fr_strerror..().  However, by xlat_eval_sync using RPEDEBUG,
it "eats" the error, and the caller gets no error message.

3 years agogroupify child nodes, which is needed
Alan T. DeKok [Thu, 10 Feb 2022 14:47:41 +0000 (09:47 -0500)] 
groupify child nodes, which is needed