]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
3 years agotypo
Alan T. DeKok [Tue, 18 Jan 2022 16:00:08 +0000 (11:00 -0500)] 
typo

3 years agomove "parse scope" to fr_inet_pton6()
Alan T. DeKok [Tue, 18 Jan 2022 15:47:37 +0000 (10:47 -0500)] 
move "parse scope" to fr_inet_pton6()

3 years agofix xlat_unregister_module() so that it works.
Alan T. DeKok [Mon, 17 Jan 2022 18:43:50 +0000 (13:43 -0500)] 
fix xlat_unregister_module() so that it works.

Nothing was setting "mod_inst".  The use of it was left over
from before we had the module_ctx_t

3 years agoadd type names / values as enums to Cast-Base
Alan T. DeKok [Mon, 17 Jan 2022 13:41:26 +0000 (08:41 -0500)] 
add type names / values as enums to Cast-Base

so that the types are in the dictionaries, which is nice.

3 years agowe don't need cast_base
Alan T. DeKok [Sun, 16 Jan 2022 19:31:03 +0000 (14:31 -0500)] 
we don't need cast_base

3 years agoprefer "allowed" to "terminals"
Alan T. DeKok [Sat, 15 Jan 2022 12:46:45 +0000 (07:46 -0500)] 
prefer "allowed" to "terminals"

If we want to parse

&Service-Type = Framed-User

then we don't want to parse it as

(&Service - Type) = (Framed - User)

or

(&Service-Type = Framed) - User

etc.

The tmpl_afrom_attr_substr() calls fr_dict_attr_by_name_substr()
which calls fr_dict_attr_by_name_substr(), which then ignores
terminals.  So this change makes parsing the RHS enum name behave
the same as parsing the LHS attribute name.

3 years agoadd fr_dict_enum_by_name_substr()
Alan T. DeKok [Fri, 14 Jan 2022 20:51:01 +0000 (15:51 -0500)] 
add fr_dict_enum_by_name_substr()

which parses an enumv by name, but doesn't take a "terminals"
argument.  Because the enums are named, and if we see a correct
name, then it's correct, no matter what the terminals are.

3 years agoreturn >0 from fr_value_box_from_substr()
Alan T. DeKok [Fri, 14 Jan 2022 21:57:34 +0000 (16:57 -0500)] 
return >0 from fr_value_box_from_substr()

mainly for ip addresses and prefixes.  And also parse scopes for
DHCPv6.  Line 20 of src/tests/unit/protocols/dhcpv6/addresses.txt
says that "scopes are ignored".

However, the only reason that the previous tests succeeded was that
fr_value_box_from_substr() was returning 0, which meant that
fr_value_box_from_str() didn't check that the entire string was
being parsed.

A first-pass fix was in commit 8a1f819e7f7, but that used an extra
sbuff, instead of just re-using our_in, among other faults.

3 years agoadd more whitespace for sanity
Alan T. DeKok [Thu, 13 Jan 2022 15:45:57 +0000 (10:45 -0500)] 
add more whitespace for sanity

value boxes shouldn't be printed all smashed together

3 years agouse -f for "don't fork", not "-X" for "kill me with debug output"
Alan T. DeKok [Fri, 14 Jan 2022 15:08:36 +0000 (10:08 -0500)] 
use -f for "don't fork", not "-X" for "kill me with debug output"

3 years agolet's use name_len
Alan T. DeKok [Fri, 14 Jan 2022 17:43:19 +0000 (12:43 -0500)] 
let's use name_len

instead of walking off of the end of arrays

3 years agoremove useless code
Alan T. DeKok [Fri, 14 Jan 2022 21:43:36 +0000 (16:43 -0500)] 
remove useless code

3 years agotypo
Alan T. DeKok [Wed, 12 Jan 2022 21:15:34 +0000 (16:15 -0500)] 
typo

3 years agoFix side channels in EAP-pwd leaking information on a password-related value
Daniel DE ALMEIDA BRAGA [Wed, 12 Jan 2022 14:48:04 +0000 (15:48 +0100)] 
Fix side channels in EAP-pwd leaking information on a password-related value

An unnecessary branching on the seed's parity at each iteration may leaks one
bit of information at each iteration. Setting is_odd to BN_is_odd directly
avoids the branch.
Additionaly, OpenSSL's implementation of EC_POINT_set_compressed_coordinates
is not constant-time with respect to the compression type. Since the
compression type is conditioned by save_is_odd, which is related to the password,
we need to avoid the generic OpenSSL call and perform the operations in
constant-time.

3 years agoallow sending packets directly to the worker
Alan T. DeKok [Tue, 11 Jan 2022 18:26:29 +0000 (13:26 -0500)] 
allow sending packets directly to the worker

3 years agoQuiet clang scan
Arran Cudbard-Bell [Sat, 8 Jan 2022 07:00:30 +0000 (23:00 -0800)] 
Quiet clang scan

3 years agoFix various issues with dcursor that would prevent them from working correctly with...
Arran Cudbard-Bell [Sat, 8 Jan 2022 00:29:54 +0000 (16:29 -0800)] 
Fix various issues with dcursor that would prevent them from working correctly with stateful iterators

3 years agoCI FreeBSD: Enable radclient tests
Terry Burton [Thu, 6 Jan 2022 20:21:23 +0000 (20:21 +0000)] 
CI FreeBSD: Enable radclient tests

3 years agoudpfromto: Use plain sendto if our source address is 0.0.0.0 or ::/0
Terry Burton [Thu, 6 Jan 2022 20:17:54 +0000 (20:17 +0000)] 
udpfromto: Use plain sendto if our source address is 0.0.0.0 or ::/0

FreeBSD sendmsg returns EINVAL if IP_SENDSRCADDR is INADDR_ANY{,6}.

3 years agoeapol_test-build.sh: Set permissive CFLAGs for FreeBSD build (#4352)
Terry Burton [Thu, 6 Jan 2022 20:08:23 +0000 (20:08 +0000)] 
eapol_test-build.sh: Set permissive CFLAGs for FreeBSD build (#4352)

... instead of patching the source.

3 years agoTrim default prefix from generated dlist functions
Arran Cudbard-Bell [Thu, 6 Jan 2022 15:24:24 +0000 (09:24 -0600)] 
Trim default prefix from generated dlist functions

3 years agoMake tmpl_attr and tmpl_request lists type safe
Arran Cudbard-Bell [Thu, 6 Jan 2022 14:33:01 +0000 (08:33 -0600)] 
Make tmpl_attr and tmpl_request lists type safe

3 years agoFormatting
Arran Cudbard-Bell [Wed, 5 Jan 2022 19:34:41 +0000 (13:34 -0600)] 
Formatting

3 years agoMake test_enqueue_and_io_speed() work (#4349)
James Jones [Thu, 6 Jan 2022 15:04:11 +0000 (09:04 -0600)] 
Make test_enqueue_and_io_speed() work (#4349)

Not advancing test_time_base kept some trunk requests from
advancing from SENT to COMPLETE state.

3 years agomore FR_PROTO_TRACE
Alan T. DeKok [Thu, 6 Jan 2022 14:53:17 +0000 (09:53 -0500)] 
more FR_PROTO_TRACE

3 years agouse temporary "end"
Alan T. DeKok [Thu, 6 Jan 2022 14:52:57 +0000 (09:52 -0500)] 
use temporary "end"

and pass the right parent in decode_wimax

3 years agocheck min/max lengths only for leaf data types
Alan T. DeKok [Thu, 6 Jan 2022 14:48:04 +0000 (09:48 -0500)] 
check min/max lengths only for leaf data types

3 years agopass the correct 'end' pointer
Alan T. DeKok [Thu, 6 Jan 2022 00:07:39 +0000 (19:07 -0500)] 
pass the correct 'end' pointer

3 years agorename regex sub to subst
Alan T. DeKok [Wed, 5 Jan 2022 21:07:30 +0000 (16:07 -0500)] 
rename regex sub to subst

3 years agoCI fixes for FreeBSD (#4351)
Terry Burton [Wed, 5 Jan 2022 21:43:17 +0000 (21:43 +0000)] 
CI fixes for FreeBSD (#4351)

* CI FreeBSD: Reenable some tests

* CI: Temporary patch for hostapd build

Build currently fails on LLVM with FreeBSD.

* CI FreeBSD: Cache the eapol_test build

3 years agoQuiet compiler
Arran Cudbard-Bell [Wed, 5 Jan 2022 18:41:03 +0000 (12:41 -0600)] 
Quiet compiler

3 years agoDon't evaluate _uctx multiple times in fr_atexit_thread_local
Arran Cudbard-Bell [Wed, 5 Jan 2022 17:59:25 +0000 (11:59 -0600)] 
Don't evaluate _uctx multiple times in fr_atexit_thread_local

3 years agoFix libpcre memory leak on exit
Arran Cudbard-Bell [Wed, 5 Jan 2022 17:18:19 +0000 (11:18 -0600)] 
Fix libpcre memory leak on exit

3 years agopair_tests fr_pair_value_copy: Allocate dst pair before copying into it (#4350)
Terry Burton [Wed, 5 Jan 2022 16:26:20 +0000 (16:26 +0000)] 
pair_tests fr_pair_value_copy: Allocate dst pair before copying into it (#4350)

Otherwise the copy will attempt to clear uninitialised dst data.

3 years agoFormatting
Arran Cudbard-Bell [Wed, 5 Jan 2022 02:54:36 +0000 (20:54 -0600)] 
Formatting

3 years agoHelps to use the right condition...
Arran Cudbard-Bell [Wed, 5 Jan 2022 02:52:49 +0000 (20:52 -0600)] 
Helps to use the right condition...

3 years agoTypo
Arran Cudbard-Bell [Wed, 5 Jan 2022 02:11:35 +0000 (20:11 -0600)] 
Typo

3 years agoMore, minor, atexit cleanups
Arran Cudbard-Bell [Wed, 5 Jan 2022 02:09:15 +0000 (20:09 -0600)] 
More, minor, atexit cleanups

3 years agoMove OpenSSL version handling code to its own source file
Arran Cudbard-Bell [Wed, 5 Jan 2022 01:58:55 +0000 (19:58 -0600)] 
Move OpenSSL version handling code to its own source file

3 years agoQuiet compiler warnings
Arran Cudbard-Bell [Tue, 4 Jan 2022 21:29:43 +0000 (15:29 -0600)] 
Quiet compiler warnings

fr_time_delta_t is a struct now...

3 years agoFlesh out the atexit debug functions more
Arran Cudbard-Bell [Tue, 4 Jan 2022 21:29:16 +0000 (15:29 -0600)] 
Flesh out the atexit debug functions more

3 years agoSearch in the correct destructor list
Arran Cudbard-Bell [Tue, 4 Jan 2022 20:45:11 +0000 (14:45 -0600)] 
Search in the correct destructor list

3 years agoUse the correct comparison function in fr_event_report
Arran Cudbard-Bell [Tue, 4 Jan 2022 20:44:54 +0000 (14:44 -0600)] 
Use the correct comparison function in fr_event_report

3 years agoFix other instances of backlogs left hanging (#4311)
James Jones [Tue, 4 Jan 2022 19:18:46 +0000 (13:18 -0600)] 
Fix other instances of backlogs left hanging (#4311)

3 years agoEnsure all the thread-specific destructors run before the global destructors
Arran Cudbard-Bell [Tue, 4 Jan 2022 19:15:43 +0000 (13:15 -0600)] 
Ensure all the thread-specific destructors run before the global destructors

Rework the OpenSSL cleanup logic

3 years agoJust use WITH_TLS....
Arran Cudbard-Bell [Tue, 4 Jan 2022 02:14:18 +0000 (20:14 -0600)] 
Just use WITH_TLS....

3 years agoUse the EVP RC4 functions
Arran Cudbard-Bell [Tue, 4 Jan 2022 02:10:30 +0000 (20:10 -0600)] 
Use the EVP RC4 functions

3 years agoEnsure openssl user macros are always defined
Arran Cudbard-Bell [Tue, 4 Jan 2022 02:08:55 +0000 (20:08 -0600)] 
Ensure openssl user macros are always defined

This causes deprecated functions to trigger fatal errors when building under macos

3 years agoinitialize packet_ctx.end
Alan T. DeKok [Tue, 4 Jan 2022 00:25:15 +0000 (19:25 -0500)] 
initialize packet_ctx.end

3 years agoremove assert
Alan T. DeKok [Tue, 4 Jan 2022 00:25:07 +0000 (19:25 -0500)] 
remove assert

3 years agoFix version function calls in dependency.c
Arran Cudbard-Bell [Mon, 3 Jan 2022 21:56:45 +0000 (15:56 -0600)] 
Fix version function calls in dependency.c

3 years agodon't pass packet_len to fr_radius_decode_pair_value()
Alan T. DeKok [Mon, 3 Jan 2022 21:09:21 +0000 (16:09 -0500)] 
don't pass packet_len to fr_radius_decode_pair_value()

which makes its function signature match the other decode functions

3 years agoclean up the providers on exit
Alan T. DeKok [Mon, 3 Jan 2022 21:02:46 +0000 (16:02 -0500)] 
clean up the providers on exit

3 years agoprotocol-specific extensions are variable sized
Alan T. DeKok [Mon, 3 Jan 2022 19:20:34 +0000 (14:20 -0500)] 
protocol-specific extensions are variable sized

and use a protocol-specific structure, which can't be shared
across multiple protocols

3 years agorearrange and remove unused code
Alan T. DeKok [Tue, 28 Dec 2021 19:22:13 +0000 (14:22 -0500)] 
rearrange and remove unused code

3 years agoheaders to help with protocol encoding / decoding
Alan T. DeKok [Tue, 28 Dec 2021 19:11:15 +0000 (14:11 -0500)] 
headers to help with protocol encoding / decoding

3 years agoupdate documentation
Alan T. DeKok [Tue, 28 Dec 2021 19:07:34 +0000 (14:07 -0500)] 
update documentation

3 years agoSwap ERR_get_error_line_data for ERR_get_error_all
Arran Cudbard-Bell [Mon, 3 Jan 2022 21:24:30 +0000 (15:24 -0600)] 
Swap ERR_get_error_line_data for ERR_get_error_all

3 years agoSet OpenSSL API compat macros centrally
Arran Cudbard-Bell [Mon, 3 Jan 2022 21:23:50 +0000 (15:23 -0600)] 
Set OpenSSL API compat macros centrally

3 years agoApparently has no effect...
Arran Cudbard-Bell [Mon, 3 Jan 2022 21:23:15 +0000 (15:23 -0600)] 
Apparently has no effect...

3 years agoWe use OPENSSL_VERSION_NUMBER everywhere else...
Arran Cudbard-Bell [Mon, 3 Jan 2022 21:22:57 +0000 (15:22 -0600)] 
We use OPENSSL_VERSION_NUMBER everywhere else...

3 years agoFix calls to PEM_read_bio_DHparams for OpenSSL 3.0.0
Arran Cudbard-Bell [Mon, 3 Jan 2022 20:18:50 +0000 (14:18 -0600)] 
Fix calls to PEM_read_bio_DHparams for OpenSSL 3.0.0

3 years agomore ltb-project key references
Arran Cudbard-Bell [Mon, 3 Jan 2022 19:50:32 +0000 (13:50 -0600)] 
more ltb-project key references

3 years agoNew LTB GPG key url
Arran Cudbard-Bell [Mon, 3 Jan 2022 19:42:50 +0000 (13:42 -0600)] 
New LTB GPG key url

3 years ago2022
Arran Cudbard-Bell [Mon, 3 Jan 2022 19:34:22 +0000 (13:34 -0600)] 
2022

3 years agoDon't need this in 1.1.1
Arran Cudbard-Bell [Thu, 23 Dec 2021 03:26:38 +0000 (21:26 -0600)] 
Don't need this in 1.1.1

3 years agoStupid hack still needed in 3.0.1
Arran Cudbard-Bell [Thu, 23 Dec 2021 03:21:08 +0000 (21:21 -0600)] 
Stupid hack still needed in 3.0.1

3 years agoYes, OpenSSL now wants the size of the buffer passed into EVP_DigestSignFinal
Arran Cudbard-Bell [Thu, 23 Dec 2021 02:30:42 +0000 (20:30 -0600)] 
Yes, OpenSSL now wants the size of the buffer passed into EVP_DigestSignFinal

3 years agomaybe OpenSSL 3.0.1 started caring about the output buffer length?
Arran Cudbard-Bell [Thu, 23 Dec 2021 01:46:43 +0000 (19:46 -0600)] 
maybe OpenSSL 3.0.1 started caring about the output buffer length?

3 years agoRevert "CI: Pass in -Wno-error=deprecated-declarations to LIB_ALT build for now"
Arran Cudbard-Bell [Thu, 23 Dec 2021 01:34:42 +0000 (19:34 -0600)] 
Revert "CI: Pass in -Wno-error=deprecated-declarations to LIB_ALT build for now"

This reverts commit 78f814cc8f99ca69f74a6886ec327bd067fa7415.

3 years agoCI: Pass in -Wno-error=deprecated-declarations to LIB_ALT build for now
Terry Burton [Wed, 22 Dec 2021 17:05:21 +0000 (17:05 +0000)] 
CI: Pass in -Wno-error=deprecated-declarations to LIB_ALT build for now

Should be reverted once port to OpenSSL 3 API is complete.

3 years agoCI: Use OpenSSL 3.0.1 in LIBS_ALT build
Terry Burton [Wed, 22 Dec 2021 13:03:49 +0000 (13:03 +0000)] 
CI: Use OpenSSL 3.0.1 in LIBS_ALT build

3 years agolet's return the correct value
Alan T. DeKok [Wed, 22 Dec 2021 17:22:08 +0000 (12:22 -0500)] 
let's return the correct value

3 years agofix decode_tlvs()
Alan T. DeKok [Wed, 22 Dec 2021 16:06:44 +0000 (11:06 -0500)] 
fix decode_tlvs()

so that it doesn't return partial decoding when one of the
internal TLVs fails to decode

3 years agoif the option is invalid, return a raw option
Alan T. DeKok [Wed, 22 Dec 2021 15:51:30 +0000 (10:51 -0500)] 
if the option is invalid, return a raw option

so that the caller does not have to do this work

3 years agounify two functions, so there's less code
Alan T. DeKok [Wed, 22 Dec 2021 15:50:45 +0000 (10:50 -0500)] 
unify two functions, so there's less code

and add assertion.  We cannot create raw "root" attributes.

3 years agotypo
Alan T. DeKok [Wed, 22 Dec 2021 14:31:59 +0000 (09:31 -0500)] 
typo

3 years agoda->parent may be NULL here, too.
Alan T. DeKok [Tue, 21 Dec 2021 21:48:22 +0000 (16:48 -0500)] 
da->parent may be NULL here, too.

we have fr_dict_unknown_attr_afrom_da() and fr_dict_unknown_afrom_da()
which are 90% identical.  Perhaps some common code would help.

3 years agoda->parent is NULL at the root
Alan T. DeKok [Tue, 21 Dec 2021 20:07:24 +0000 (15:07 -0500)] 
da->parent is NULL at the root

3 years agorearrange to show how to assign octets to structural members
Alan T. DeKok [Tue, 21 Dec 2021 17:38:09 +0000 (12:38 -0500)] 
rearrange to show how to assign octets to structural members

code isn't done, but it's a start of rearrangement

3 years agoadd := test
Alan T. DeKok [Mon, 20 Dec 2021 14:13:41 +0000 (09:13 -0500)] 
add := test

Also if the RHS is octets, then it should be parsed as the correct
data type. Right now this happens on compilation, but it should
also happen at run-time

3 years agouse new hack function, so that we support T_OP_EQ and T_OP_SET
Alan T. DeKok [Mon, 20 Dec 2021 14:05:02 +0000 (09:05 -0500)] 
use new hack function, so that we support T_OP_EQ and T_OP_SET

3 years agolet's use typed arguments
Alan T. DeKok [Tue, 21 Dec 2021 16:48:07 +0000 (11:48 -0500)] 
let's use typed arguments

3 years agosplit out functions as per other protocols
Alan T. DeKok [Tue, 21 Dec 2021 15:46:28 +0000 (10:46 -0500)] 
split out functions as per other protocols

3 years agoremove "do_raw", which doesn't make sense
Alan T. DeKok [Tue, 21 Dec 2021 15:17:58 +0000 (10:17 -0500)] 
remove "do_raw", which doesn't make sense

3 years agoadd temporary hack function
Alan T. DeKok [Mon, 20 Dec 2021 13:59:47 +0000 (08:59 -0500)] 
add temporary hack function

which will be removed as soon as we have the better function

3 years agothis function is only used by the xlat code
Alan T. DeKok [Sun, 19 Dec 2021 19:18:00 +0000 (14:18 -0500)] 
this function is only used by the xlat code

so rename, it, and move the function prototype to a place which
makes more sense.

3 years agodecode_pair test point should take fr_dict_attr_t const *parent
Alan T. DeKok [Sun, 19 Dec 2021 19:14:14 +0000 (14:14 -0500)] 
decode_pair test point should take fr_dict_attr_t const *parent

which lets us start decoding part way through the dictionary,
instead of always at the top

3 years agoremove fr_dict_t from struct trampoline functions
Alan T. DeKok [Sun, 19 Dec 2021 13:56:15 +0000 (08:56 -0500)] 
remove fr_dict_t from struct trampoline functions

3 years agoclarify error message
Alan T. DeKok [Sun, 19 Dec 2021 13:44:35 +0000 (08:44 -0500)] 
clarify error message

3 years agominor rearrangements, and update arrays for new operators
Alan T. DeKok [Sun, 19 Dec 2021 13:23:36 +0000 (08:23 -0500)] 
minor rearrangements, and update arrays for new operators

3 years agoencode / decode STRUCT too
Alan T. DeKok [Sun, 19 Dec 2021 13:18:45 +0000 (08:18 -0500)] 
encode / decode STRUCT too

the same as TLV, because we don't have packed-structures
in the internal protocol.  And the internal protocol doesn't use
protocol-specific encodings.  It uses the internal encodings

3 years agono need to pass dict_dns to all of the dns functions
Alan T. DeKok [Sun, 19 Dec 2021 00:58:32 +0000 (19:58 -0500)] 
no need to pass dict_dns to all of the dns functions

3 years agono need to pass dict_dhcpv6 to all of the dhcpv6 functions
Alan T. DeKok [Sun, 19 Dec 2021 00:56:12 +0000 (19:56 -0500)] 
no need to pass dict_dhcpv6 to all of the dhcpv6 functions

3 years agono need to pass dict_dhcpv4 to all of the dhcpv4 functions
Alan T. DeKok [Sat, 18 Dec 2021 15:58:10 +0000 (10:58 -0500)] 
no need to pass dict_dhcpv4 to all of the dhcpv4 functions

3 years agono need to pass dict_radius to all of the radius functions
Alan T. DeKok [Sat, 18 Dec 2021 15:45:17 +0000 (10:45 -0500)] 
no need to pass dict_radius to all of the radius functions

3 years agomore operations for ip addresses and prefixes
Alan T. DeKok [Fri, 17 Dec 2021 20:09:34 +0000 (15:09 -0500)] 
more operations for ip addresses and prefixes

3 years agoCI FreeBSD: Run on push/pull; more VM memory; use rsync, not sshfs (#4333)
Terry Burton [Tue, 21 Dec 2021 03:07:47 +0000 (03:07 +0000)] 
CI FreeBSD: Run on push/pull; more VM memory; use rsync, not sshfs (#4333)

3 years agoFix dlist definition macros to be safer
Arran Cudbard-Bell [Fri, 17 Dec 2021 18:34:09 +0000 (12:34 -0600)] 
Fix dlist definition macros to be safer

3 years ago-Wunused
Alan T. DeKok [Fri, 17 Dec 2021 14:40:18 +0000 (09:40 -0500)] 
-Wunused