]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
11 months agoRevert "maybe pthread functions are in -lc?"
Arran Cudbard-Bell [Thu, 5 Sep 2024 01:05:18 +0000 (19:05 -0600)] 
Revert "maybe pthread functions are in -lc?"

This reverts commit 54c3e38527e890588a98154ae2b23804008081e4.

11 months agoadd looping over TLVs
Alan T. DeKok [Wed, 4 Sep 2024 15:11:28 +0000 (11:11 -0400)] 
add looping over TLVs

and ensure that we can access child members.

via a small amount of code which is a terrible hack.

11 months agoensure that the data types in "foreach" are compatible
Alan T. DeKok [Wed, 4 Sep 2024 14:58:05 +0000 (10:58 -0400)] 
ensure that the data types in "foreach" are compatible

11 months agoMore trunk connection UBSAN false positives
Nick Porter [Wed, 4 Sep 2024 11:33:51 +0000 (12:33 +0100)] 
More trunk connection UBSAN false positives

11 months agoMore connection_t related UBSAN false positives
Nick Porter [Wed, 4 Sep 2024 10:40:14 +0000 (11:40 +0100)] 
More connection_t related UBSAN false positives

11 months agoUBSAN false positives on trunk connection_alloc calls
Nick Porter [Wed, 4 Sep 2024 09:53:54 +0000 (10:53 +0100)] 
UBSAN false positives on trunk connection_alloc calls

11 months agoMore UBSAN function signature false positives
Nick Porter [Wed, 4 Sep 2024 09:11:56 +0000 (10:11 +0100)] 
More UBSAN function signature false positives

11 months agofr_assert does noting on NDEBUG builds
Nick Porter [Wed, 4 Sep 2024 09:07:33 +0000 (10:07 +0100)] 
fr_assert does noting on NDEBUG builds

So clang scan thinks ref can be NULL

11 months agoCorrect fr_fatal_assert macro
Nick Porter [Wed, 4 Sep 2024 09:04:24 +0000 (10:04 +0100)] 
Correct fr_fatal_assert macro

11 months agoAlterative ipv6 masking to work round alignment issues
Nick Porter [Wed, 4 Sep 2024 08:26:31 +0000 (09:26 +0100)] 
Alterative ipv6 masking to work round alignment issues

11 months agoRevert "add test looping over children of a TLV"
Alan T. DeKok [Tue, 3 Sep 2024 20:18:18 +0000 (16:18 -0400)] 
Revert "add test looping over children of a TLV"

This reverts commit c105db87995ecee180771bc55f4d43a37efed9bd.

apparently adding local tlvs breaks the wimax tests.

Error : src/tests/keywords/wimax[7]: Failed parsing attribute reference &26.24757.84.9.5.7 - Parent type of nested attribute 26 must be of type "struct", "tlv", "vendor", "vsa" or "group", got "octets"
Error : src/tests/keywords/wimax[7]: &26.24757.84.9.5.7
Error : src/tests/keywords/wimax[7]:     ^

arguably the error is correct.  but in the interest of making CI
pass, and not annoying others, we just disable the failing test
for now

11 months agodon't copy children of a group
Alan T. DeKok [Tue, 3 Sep 2024 19:32:03 +0000 (15:32 -0400)] 
don't copy children of a group

11 months agoadd TMP TLV and test
Alan T. DeKok [Tue, 3 Sep 2024 19:05:11 +0000 (15:05 -0400)] 
add TMP TLV and test

11 months agodelete old attributes every time through the loop
Alan T. DeKok [Tue, 3 Sep 2024 18:59:38 +0000 (14:59 -0400)] 
delete old attributes every time through the loop

and minor cleanups

11 months agocopy children of structural attributes
Alan T. DeKok [Tue, 3 Sep 2024 18:32:51 +0000 (14:32 -0400)] 
copy children of structural attributes

to the new local dictionary

11 months agoadd API to copy attributes to a different dictionary
Alan T. DeKok [Tue, 3 Sep 2024 18:31:55 +0000 (14:31 -0400)] 
add API to copy attributes to a different dictionary

11 months agomove assertion to run-time error
Alan T. DeKok [Tue, 3 Sep 2024 16:53:37 +0000 (12:53 -0400)] 
move assertion to run-time error

so that we don't crash when the admin mis-types something

11 months agoadd test looping over children of a TLV
Alan T. DeKok [Tue, 3 Sep 2024 15:49:35 +0000 (11:49 -0400)] 
add test looping over children of a TLV

11 months agocheck if the dictionaries are compatible.
Alan T. DeKok [Tue, 3 Sep 2024 15:37:06 +0000 (11:37 -0400)] 
check if the dictionaries are compatible.

don't check if the ptrs are equal

11 months agodocument attr_prefix and key off of enum value, not '&'
Alan T. DeKok [Tue, 3 Sep 2024 15:25:48 +0000 (11:25 -0400)] 
document attr_prefix and key off of enum value, not '&'

which helps with the migration away from '&'

11 months agoadd assertions to make intent clear
Alan T. DeKok [Tue, 3 Sep 2024 15:24:59 +0000 (11:24 -0400)] 
add assertions to make intent clear

which doesn't change anything, but does help us track the
migration away from '&'

11 months agouse correct names
Alan T. DeKok [Tue, 3 Sep 2024 15:23:11 +0000 (11:23 -0400)] 
use correct names

if we use "bool" for TMPL_ATTR_REF_PREFIX things, then code searches
won't find the right values.

So we explicitly initialize vpt->rules.attr.prefix = YES

11 months agotweak docs to more clearly describe what's happening
Alan T. DeKok [Tue, 3 Sep 2024 15:21:41 +0000 (11:21 -0400)] 
tweak docs to more clearly describe what's happening

11 months agoadd migration flag for tmpl_require_enum_prefix
Alan T. DeKok [Tue, 3 Sep 2024 14:42:25 +0000 (10:42 -0400)] 
add migration flag for tmpl_require_enum_prefix

11 months agoAdd test for DHCPv4 options after Pad Option
Nick Porter [Tue, 3 Sep 2024 17:10:34 +0000 (18:10 +0100)] 
Add test for DHCPv4 options after Pad Option

11 months agoWalk over padding bytes when decoding DHCPv4
Nick Porter [Tue, 3 Sep 2024 17:09:47 +0000 (18:09 +0100)] 
Walk over padding bytes when decoding DHCPv4

Packets are allowed to contain as many bytes of Pad Option as they want.
They have been seen in the wild with 50 bytes of 0, then with more valid
options after...

11 months agoUbuntu 24.04 already uses OpenSSL 3.0
Nick Porter [Tue, 3 Sep 2024 10:16:10 +0000 (11:16 +0100)] 
Ubuntu 24.04 already uses OpenSSL 3.0

11 months agoPacify UBSAN
Nick Porter [Tue, 3 Sep 2024 09:51:05 +0000 (10:51 +0100)] 
Pacify UBSAN

11 months agoConsistent function signature for compile_*
Nick Porter [Tue, 3 Sep 2024 09:47:36 +0000 (10:47 +0100)] 
Consistent function signature for compile_*

Satisifies UBSAN function analysis

11 months agoTypo
Nick Porter [Tue, 3 Sep 2024 07:44:00 +0000 (08:44 +0100)] 
Typo

11 months agogcc doesn't have __has_feature
Nick Porter [Tue, 3 Sep 2024 07:34:29 +0000 (08:34 +0100)] 
gcc doesn't have __has_feature

And the pre-processor appears to parse the whole line before determining
that __clang__ is not defined

11 months agoStart the very long process of placating ubsan
Arran Cudbard-Bell [Tue, 3 Sep 2024 00:55:49 +0000 (18:55 -0600)] 
Start the very long process of placating ubsan

11 months agotypo
Alan T. DeKok [Mon, 2 Sep 2024 21:46:40 +0000 (17:46 -0400)] 
typo

11 months agoenable expressions in attribute array indexes
Alan T. DeKok [Mon, 2 Sep 2024 21:33:49 +0000 (17:33 -0400)] 
enable expressions in attribute array indexes

alonw with test and documentation

11 months agoadd function to evaluate xlat in place, to a type
Alan T. DeKok [Mon, 2 Sep 2024 21:33:18 +0000 (17:33 -0400)] 
add function to evaluate xlat in place, to a type

11 months agoadd function to evaluate xlat in place
Alan T. DeKok [Mon, 2 Sep 2024 20:41:21 +0000 (16:41 -0400)] 
add function to evaluate xlat in place

without returning "yield"

11 months agoremove duplicate casts
Alan T. DeKok [Mon, 2 Sep 2024 18:01:55 +0000 (14:01 -0400)] 
remove duplicate casts

11 months agoCorrect installation of libstdc++
Nick Porter [Mon, 2 Sep 2024 17:33:04 +0000 (18:33 +0100)] 
Correct installation of libstdc++

11 months agoempty strings are empty lists
Alan T. DeKok [Mon, 2 Sep 2024 15:51:21 +0000 (11:51 -0400)] 
empty strings are empty lists

so that we don't get confused when the debug output prints

cmp({},{}) --> false

because it's really instead

cmp({''},{})

which is an empty string on one side, and an empty set on the other.

11 months agojust left-pad with zeros on cast from "too small" octet values
Alan T. DeKok [Mon, 2 Sep 2024 14:22:08 +0000 (10:22 -0400)] 
just left-pad with zeros on cast from "too small" octet values

11 months agodon't mash RHS to one string return the set
Alan T. DeKok [Mon, 2 Sep 2024 14:03:15 +0000 (10:03 -0400)] 
don't mash RHS to one string return the set

11 months agokey off of state, and not just '&'
Alan T. DeKok [Mon, 2 Sep 2024 13:51:15 +0000 (09:51 -0400)] 
key off of state, and not just '&'

11 months ago2nd attempt to clean up "set leaf num" API
Nick Porter [Mon, 2 Sep 2024 15:35:39 +0000 (16:35 +0100)] 
2nd attempt to clean up "set leaf num" API

update section lhs doesn't need &attr changed to &attr[*]

11 months agoRevert "clean up "set leaf num" API"
Alan T. DeKok [Mon, 2 Sep 2024 13:06:39 +0000 (09:06 -0400)] 
Revert "clean up "set leaf num" API"

This reverts commit 3bccf7a70e7cc602a9a2646b538355c8f1cb3ef3.

this breaks the cache_redis tests

11 months agoupdate tokenizer for tmpl_require_enum_prefix
Alan T. DeKok [Mon, 2 Sep 2024 13:03:11 +0000 (09:03 -0400)] 
update tokenizer for tmpl_require_enum_prefix

it still has issues parsing

(byte)Class

because it tries to parse "Class" as data type "byte"

11 months agohoist "set flag" to before we read the config files
Alan T. DeKok [Mon, 2 Sep 2024 12:57:46 +0000 (08:57 -0400)] 
hoist "set flag" to before we read the config files

11 months agodon't let the user delete attributes we're looping over
Alan T. DeKok [Mon, 2 Sep 2024 12:22:36 +0000 (08:22 -0400)] 
don't let the user delete attributes we're looping over

this isn't perfect, but it's good enough.

It can still crash if the user has one "foreach" loop nested
inside of another one, AND both loop over the same attributes,
AND a variable is deleted after the inner "foreach" loop is run.

The general answer then is "don't do that".

We could fix this by using the old way of copying all of the VPs,
looping over the copy, and then moving the copy back in place of
the original VPs.  But that process is expensive, and almost always
not needed.

For now, it's simpler to just say "don't modify the attributes
you're looping over"

11 months agoclean up "set leaf num" API
Alan T. DeKok [Mon, 2 Sep 2024 12:02:05 +0000 (08:02 -0400)] 
clean up "set leaf num" API

we now only have one function instead of two, and it always does
the right thing, even if the tail filter isn't a static number

11 months agocleanups and fixes from previous commit
Alan T. DeKok [Mon, 2 Sep 2024 11:37:13 +0000 (07:37 -0400)] 
cleanups and fixes from previous commit

11 months agojust use function instead of "roll your own" code
Alan T. DeKok [Mon, 2 Sep 2024 11:15:20 +0000 (07:15 -0400)] 
just use function instead of "roll your own" code

which incidentally also handles unknown attributes, too

11 months agoremove unused function
Alan T. DeKok [Mon, 2 Sep 2024 11:10:15 +0000 (07:10 -0400)] 
remove unused function

11 months agoset_leaf_da() should also set leaf filter
Alan T. DeKok [Mon, 2 Sep 2024 11:08:26 +0000 (07:08 -0400)] 
set_leaf_da() should also set leaf filter

11 months agoRevert "Disable -fsanitize=function for htrie functions"
Arran Cudbard-Bell [Mon, 2 Sep 2024 03:16:15 +0000 (21:16 -0600)] 
Revert "Disable -fsanitize=function for htrie functions"

This reverts commit e382c989f2573399ea90eaca5232d11f8fd476d0.

11 months agoDisable -fsanitize=function for htrie functions
Arran Cudbard-Bell [Mon, 2 Sep 2024 02:55:34 +0000 (20:55 -0600)] 
Disable -fsanitize=function for htrie functions

11 months agohtrie callbacks should take a void * as the tree arg type
Arran Cudbard-Bell [Mon, 2 Sep 2024 02:05:45 +0000 (20:05 -0600)] 
htrie callbacks should take a void * as the tree arg type

11 months agoFix compile function signatures
Arran Cudbard-Bell [Mon, 2 Sep 2024 01:31:17 +0000 (19:31 -0600)] 
Fix compile function signatures

11 months agoJust use the latest version of postgresql
Arran Cudbard-Bell [Mon, 2 Sep 2024 00:21:38 +0000 (18:21 -0600)] 
Just use the latest version of postgresql

11 months agoFire insufficient
Arran Cudbard-Bell [Sun, 1 Sep 2024 21:08:19 +0000 (15:08 -0600)] 
Fire insufficient

11 months agoThis is an AND, so won't work
Arran Cudbard-Bell [Sun, 1 Sep 2024 20:57:20 +0000 (14:57 -0600)] 
This is an AND, so won't work

11 months agoBump coverity OS
Arran Cudbard-Bell [Sun, 1 Sep 2024 20:49:00 +0000 (14:49 -0600)] 
Bump coverity OS

11 months agoKill it with fire?
Arran Cudbard-Bell [Sun, 1 Sep 2024 20:46:37 +0000 (14:46 -0600)] 
Kill it with fire?

11 months agoActually add fuzzing as an argument...
Arran Cudbard-Bell [Sun, 1 Sep 2024 18:36:40 +0000 (12:36 -0600)] 
Actually add fuzzing as an argument...

11 months agoInstall libstdc++ when we're fuzzing
Arran Cudbard-Bell [Sun, 1 Sep 2024 18:30:52 +0000 (12:30 -0600)] 
Install libstdc++ when we're fuzzing

11 months agoApparmor is disabled, don't try and install utils
Arran Cudbard-Bell [Sun, 1 Sep 2024 18:12:36 +0000 (12:12 -0600)] 
Apparmor is disabled, don't try and install utils

11 months agoFix builds with alternative versions of OpenSSL
Arran Cudbard-Bell [Sun, 1 Sep 2024 17:20:22 +0000 (11:20 -0600)] 
Fix builds with alternative versions of OpenSSL

11 months agodistinguish usage of "group"
Alan T. DeKok [Sun, 1 Sep 2024 16:19:34 +0000 (12:19 -0400)] 
distinguish usage of "group"

group foo

is a local variable definition

group foo {

is a section name.

Oops.

11 months agoonly print out top-level list
Alan T. DeKok [Sun, 1 Sep 2024 14:47:26 +0000 (10:47 -0400)] 
only print out top-level list

so we don't print the inner-most things repeatedly

11 months agoadd a bit more debug information
Alan T. DeKok [Sun, 1 Sep 2024 14:31:54 +0000 (10:31 -0400)] 
add a bit more debug information

11 months agoparse &attr[%{&foo - 1}]
Alan T. DeKok [Sun, 1 Sep 2024 13:41:16 +0000 (09:41 -0400)] 
parse &attr[%{&foo - 1}]

and ensure that things we parse but don't (yet) support are run-time
errors.

11 months agotrack impure functions separately from pure xlats
Alan T. DeKok [Sun, 1 Sep 2024 13:38:35 +0000 (09:38 -0400)] 
track impure functions separately from pure xlats

which means that

&foo - 1

isn't pure, because it depends on "foo".  But it's also not an
impure function, which means it can be calculated without the
interpreter yielding

11 months agoquiet static analyzer
Alan T. DeKok [Sun, 1 Sep 2024 12:46:16 +0000 (08:46 -0400)] 
quiet static analyzer

11 months agoadd, test, and document &atrr-foo[&attr-num]
Alan T. DeKok [Sun, 1 Sep 2024 12:35:15 +0000 (08:35 -0400)] 
add, test, and document &atrr-foo[&attr-num]

11 months agomove "foreach" to use tmpl_attr_set_leaf_num()
Alan T. DeKok [Sun, 1 Sep 2024 12:04:36 +0000 (08:04 -0400)] 
move "foreach" to use tmpl_attr_set_leaf_num()

and move tmpl_attr_set_leaf_num() to set the filter type, too

11 months agoadd prototype
Alan T. DeKok [Sun, 1 Sep 2024 11:57:03 +0000 (07:57 -0400)] 
add prototype

11 months agorevert everything related to attribute leaf indexes
Alan T. DeKok [Sun, 1 Sep 2024 11:50:56 +0000 (07:50 -0400)] 
revert everything related to attribute leaf indexes

as we add different types of indexes, we should really audit
the use of ar->ar_num

11 months agorevert leaf changes so that they can be made gradually
Alan T. DeKok [Sun, 1 Sep 2024 11:26:17 +0000 (07:26 -0400)] 
revert leaf changes so that they can be made gradually

11 months agotypo
Alan T. DeKok [Sat, 31 Aug 2024 20:14:31 +0000 (16:14 -0400)] 
typo

11 months agoset ar_num when creating tmpl_attr from list
Alan T. DeKok [Sat, 31 Aug 2024 20:06:02 +0000 (16:06 -0400)] 
set ar_num when creating tmpl_attr from list

11 months agoRevert "maybe fix the redis test in CI"
Alan T. DeKok [Sat, 31 Aug 2024 19:37:19 +0000 (15:37 -0400)] 
Revert "maybe fix the redis test in CI"

This reverts commit 7568f6b2098d6b8fe8fd385df5a65d54dbb9cf7a.

nope

11 months agomaybe fix the redis test in CI
Alan T. DeKok [Sat, 31 Aug 2024 19:30:20 +0000 (15:30 -0400)] 
maybe fix the redis test in CI

11 months agoclean up uses of "set leaf num"
Alan T. DeKok [Sat, 31 Aug 2024 14:08:53 +0000 (10:08 -0400)] 
clean up uses of "set leaf num"

in most cases it's not necessary.  We instead initialize the
ar filter to NONE.

In other cases (now that we may have multiple kinds of filters),
we check that we're only setting the num for FILTER_INDEX.
and if we're clearing the num by setting it to NUM_UNSPEC, we
also set the filter to FILTER_NONE

Much of the code in the server assumed that it could always look
at ar->ar_num.  It would therefore behave "surprisingly" when
other filters are used.

11 months agoif we're setting a leaf num, ensure the filter type is correct
Alan T. DeKok [Sat, 31 Aug 2024 14:02:46 +0000 (10:02 -0400)] 
if we're setting a leaf num, ensure the filter type is correct

11 months agogive warning on 'foreach' not using [*]
Alan T. DeKok [Sat, 31 Aug 2024 13:56:08 +0000 (09:56 -0400)] 
give warning on 'foreach' not using [*]

11 months agoremove "auto", and allow just foreach foo (&bar) { ... }
Alan T. DeKok [Fri, 30 Aug 2024 19:59:36 +0000 (15:59 -0400)] 
remove "auto", and allow just foreach foo (&bar) { ... }

11 months agodocument that we can modify attributes
Alan T. DeKok [Fri, 30 Aug 2024 18:38:56 +0000 (14:38 -0400)] 
document that we can modify attributes

11 months agoallow modification of leaf attributes in "foreach"
Alan T. DeKok [Fri, 30 Aug 2024 18:26:28 +0000 (14:26 -0400)] 
allow modification of leaf attributes in "foreach"

11 months agolocal variables can't be list refs or request refs
Alan T. DeKok [Fri, 30 Aug 2024 17:58:34 +0000 (13:58 -0400)] 
local variables can't be list refs or request refs

11 months agocompile_children() frees the group on error
Alan T. DeKok [Fri, 30 Aug 2024 17:24:34 +0000 (13:24 -0400)] 
compile_children() frees the group on error

11 months agoadd 'const'
Alan T. DeKok [Fri, 30 Aug 2024 14:55:56 +0000 (10:55 -0400)] 
add 'const'

11 months agodocument new foreach syntax
Alan T. DeKok [Fri, 30 Aug 2024 14:41:34 +0000 (10:41 -0400)] 
document new foreach syntax

11 months agocreate and copy local key variable
Alan T. DeKok [Fri, 30 Aug 2024 14:12:56 +0000 (10:12 -0400)] 
create and copy local key variable

allegedly structural types should work, but it's untested. :)

11 months agodefine local variable via: foreach uint32 foo (...) { ... }
Alan T. DeKok [Thu, 29 Aug 2024 20:01:58 +0000 (16:01 -0400)] 
define local variable via: foreach uint32 foo (...) { ... }

the variable is defined, and references to it in the "foreach"
loop body work.

11 months agoparse new syntax for "foreach"
Alan T. DeKok [Thu, 29 Aug 2024 19:02:01 +0000 (15:02 -0400)] 
parse new syntax for "foreach"

nothing is compiled or intepreted as yet, but we're a step ahead

11 months agoUse current time rather than packet time in redis_ippool tests
Nick Porter [Thu, 29 Aug 2024 17:41:44 +0000 (18:41 +0100)] 
Use current time rather than packet time in redis_ippool tests

Sometimes, bringing the cluster up takes long enough to cause the test
to appear to fail.

Packet time starts before the cluster is reset, rather than when the
main test policy is run.

11 months agoBoth stop and disable apparmor
Nick Porter [Thu, 29 Aug 2024 16:23:22 +0000 (17:23 +0100)] 
Both stop and disable apparmor

11 months agoAdd platform to hostapd-cache key
Nick Porter [Thu, 29 Aug 2024 15:48:21 +0000 (16:48 +0100)] 
Add platform to hostapd-cache key

When building FreeRADIUS in a docker container, runner.os is the host
platform - so does not change to reflect the docker image the build is
running in.

11 months agoMove to latest eapol_test release
Nick Porter [Thu, 29 Aug 2024 15:39:32 +0000 (16:39 +0100)] 
Move to latest eapol_test release

11 months agowe only use OpenSSL stuff when it's built
Alan T. DeKok [Thu, 29 Aug 2024 15:36:49 +0000 (11:36 -0400)] 
we only use OpenSSL stuff when it's built

11 months agomore "shut up broken compiler"
Alan T. DeKok [Thu, 29 Aug 2024 15:33:12 +0000 (11:33 -0400)] 
more "shut up broken compiler"

11 months agoadd dbuff macro which initializes output buffers
Alan T. DeKok [Thu, 29 Aug 2024 14:02:39 +0000 (10:02 -0400)] 
add dbuff macro which initializes output buffers

and use it to quiet the compiler.