]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
7 years agoUpdate the redis_ippool test cases so they use newer unlang/xlat syntax where appropriate
Arran Cudbard-Bell [Thu, 7 Mar 2019 07:37:01 +0000 (15:37 +0800)] 
Update the redis_ippool test cases so they use newer unlang/xlat syntax where appropriate

Use RADIUS attributes everywhere instead of DHCP (we don't allow DHCP outside of DHCP virtual servers now.

and fix other minor things like utility paths...

7 years agoTypo in redis cluster log message
Arran Cudbard-Bell [Thu, 7 Mar 2019 06:19:54 +0000 (14:19 +0800)] 
Typo in redis cluster log message

7 years agoFix issue where no ips are added where the initial request triggers a cluster remap...
Arran Cudbard-Bell [Thu, 7 Mar 2019 06:19:23 +0000 (14:19 +0800)] 
Fix issue where no ips are added where the initial request triggers a cluster remap and the number of IPs allocated is less than MAX_PIPLINED

7 years agodon't actually need to set module name
Arran Cudbard-Bell [Thu, 7 Mar 2019 06:16:11 +0000 (14:16 +0800)] 
don't actually need to set module name

7 years agoCleanup log output in rlm_redis_ippool_tool
Arran Cudbard-Bell [Thu, 7 Mar 2019 05:48:57 +0000 (13:48 +0800)] 
Cleanup log output in rlm_redis_ippool_tool

7 years agoFix request leak in unit_test_module on error, by smashing it with a big hammer...
Arran Cudbard-Bell [Thu, 7 Mar 2019 05:24:38 +0000 (13:24 +0800)] 
Fix request leak in unit_test_module on error, by smashing it with a big hammer...

7 years agoSwitch fr_redis_pipline_free to inline function
Arran Cudbard-Bell [Thu, 7 Mar 2019 05:24:05 +0000 (13:24 +0800)] 
Switch fr_redis_pipline_free to inline function

7 years agoFormatting
Arran Cudbard-Bell [Thu, 7 Mar 2019 05:23:51 +0000 (13:23 +0800)] 
Formatting

7 years agoRename reply_num to reply_cnt
Arran Cudbard-Bell [Thu, 7 Mar 2019 05:23:44 +0000 (13:23 +0800)] 
Rename reply_num to reply_cnt

7 years agoFormatting
Arran Cudbard-Bell [Thu, 7 Mar 2019 05:22:49 +0000 (13:22 +0800)] 
Formatting

7 years agoDon't leak reply objects the any time the script needs to be loaded
Arran Cudbard-Bell [Thu, 7 Mar 2019 05:22:32 +0000 (13:22 +0800)] 
Don't leak reply objects the any time the script needs to be loaded

This is a pretty minor leak as the scripts are usually only loaded on startup, but if someone kept trashing the script cache, this could become an issue.

7 years agoUse proper type for s_ret so we get enum values in the debugger
Arran Cudbard-Bell [Thu, 7 Mar 2019 05:21:17 +0000 (13:21 +0800)] 
Use proper type for s_ret so we get enum values in the debugger

7 years agoRemove trigger and dictionary init from rlm_redis_ipool_tool
Arran Cudbard-Bell [Wed, 6 Mar 2019 12:40:03 +0000 (20:40 +0800)] 
Remove trigger and dictionary init from rlm_redis_ipool_tool

Fix leak of conf->cs too so we get a clean exit under ASAN

7 years agoFix memory leak in fr_redis_get_version
Arran Cudbard-Bell [Wed, 6 Mar 2019 12:10:51 +0000 (20:10 +0800)] 
Fix memory leak in fr_redis_get_version

7 years agoAdd additional redis_node and redis_remap xlats so that we can get the redis tests...
Arran Cudbard-Bell [Wed, 6 Mar 2019 12:10:28 +0000 (20:10 +0800)] 
Add additional redis_node and redis_remap xlats so that we can get the redis tests functioning reliably again

The root cause of this problem is that the utility used to setup the cluster no longer assigned key ranges in a deterministic way.

The tests assumed data would be written to one node, and it was instead written to another.

7 years agoAdd additional functions to allow remaps to be triggered, and to lookup the node...
Arran Cudbard-Bell [Wed, 6 Mar 2019 11:50:33 +0000 (19:50 +0800)] 
Add additional functions to allow remaps to be triggered, and to lookup the node that should be serviced by a key

7 years agoFormatting
Arran Cudbard-Bell [Wed, 6 Mar 2019 11:49:25 +0000 (19:49 +0800)] 
Formatting

7 years agoFix edge case with fr_vasprintf
Arran Cudbard-Bell [Wed, 6 Mar 2019 11:23:52 +0000 (19:23 +0800)] 
Fix edge case with fr_vasprintf

%pV:%u would print the boxed value and a pointer to the box.

7 years agoDeal with REDIS_RCODE_MOVE for directed queries (queries against a specific node)
Arran Cudbard-Bell [Wed, 6 Mar 2019 02:31:47 +0000 (10:31 +0800)] 
Deal with REDIS_RCODE_MOVE for directed queries (queries against a specific node)

Before the xlat would just return an empty result and not indicate why

7 years agoCreate value boxes from status messages and errors too
Arran Cudbard-Bell [Wed, 6 Mar 2019 02:30:42 +0000 (10:30 +0800)] 
Create value boxes from status messages and errors too

This is actually pretty useful now we have %pV which didn't exist at the time the function was written...

7 years agoHave fr_redis_reply_free set the pointer containing the reply to NULL
Arran Cudbard-Bell [Wed, 6 Mar 2019 02:30:02 +0000 (10:30 +0800)] 
Have fr_redis_reply_free set the pointer containing the reply to NULL

7 years agocomment out test until we figure out why it fails
Alan T. DeKok [Wed, 6 Mar 2019 16:21:05 +0000 (11:21 -0500)] 
comment out test until we figure out why it fails

7 years agoMerge pull request #2556 from jpereira/v4/test1
Alan DeKok [Wed, 6 Mar 2019 15:13:14 +0000 (10:13 -0500)] 
Merge pull request #2556 from jpereira/v4/test1

The 'make test' should call 'tests.bin' first

7 years agoMerge pull request #2555 from jpereira/v4/fix-test
Alan DeKok [Wed, 6 Mar 2019 15:13:00 +0000 (10:13 -0500)] 
Merge pull request #2555 from jpereira/v4/fix-test

binary unit tests

7 years agoThe 'make test' should call 'tests.bin' first 2556/head
Jorge Pereira [Tue, 5 Mar 2019 23:13:52 +0000 (20:13 -0300)] 
The 'make test' should call 'tests.bin' first

7 years agotests.bin: Add unit_test_attribute test 2555/head
Jorge Pereira [Tue, 5 Mar 2019 22:53:41 +0000 (19:53 -0300)] 
tests.bin: Add unit_test_attribute test

7 years agotests.bin: Add tests for smbencrypt result
Jorge Pereira [Tue, 5 Mar 2019 22:15:02 +0000 (19:15 -0300)] 
tests.bin: Add tests for smbencrypt result

7 years agoAdd length parameter to 'ring_buffer_test'
Jorge Pereira [Tue, 5 Mar 2019 22:04:34 +0000 (19:04 -0300)] 
Add length parameter to 'ring_buffer_test'

7 years agotests.bin: Add radsniff interface list test
Jorge Pereira [Tue, 5 Mar 2019 21:54:28 +0000 (18:54 -0300)] 
tests.bin: Add radsniff interface list test

7 years agotests.bin: Add message's set test
Jorge Pereira [Tue, 5 Mar 2019 21:52:17 +0000 (18:52 -0300)] 
tests.bin: Add message's set test

7 years agotests.bin: Add control's test
Jorge Pereira [Tue, 5 Mar 2019 21:50:12 +0000 (18:50 -0300)] 
tests.bin: Add control's test

7 years agotests.bin: Add queue atomic test
Jorge Pereira [Tue, 5 Mar 2019 21:48:26 +0000 (18:48 -0300)] 
tests.bin: Add queue atomic test

7 years agotests.bin: Add tests for all binaries
Jorge Pereira [Tue, 5 Mar 2019 21:37:27 +0000 (18:37 -0300)] 
tests.bin: Add tests for all binaries

7 years agoFix the '-h' return to be success
Jorge Pereira [Tue, 5 Mar 2019 21:36:50 +0000 (18:36 -0300)] 
Fix the '-h' return to be success

7 years agoRevert "more CC_HINT(nonnull)"
Alan T. DeKok [Tue, 5 Mar 2019 21:18:02 +0000 (16:18 -0500)] 
Revert "more CC_HINT(nonnull)"

This reverts commit 4fa52e12c96dc43865a7b5f13aca6f13f81c2f19.

<sigh> Stupid compilers don't notice that variables aren't NULL.
This change will have to be done in many small commits

7 years agoMerge pull request #2554 from jpereira/v4/fix-ring_buffer
Alan DeKok [Tue, 5 Mar 2019 21:17:35 +0000 (16:17 -0500)] 
Merge pull request #2554 from jpereira/v4/fix-ring_buffer

ring_buffer_test: Fix fr_cond_assert() call

7 years agoring_buffer_test: Fix fr_cond_assert() call 2554/head
Jorge Pereira [Tue, 5 Mar 2019 21:14:42 +0000 (18:14 -0300)] 
ring_buffer_test: Fix fr_cond_assert() call

7 years agoparent node properly, and add a free callback
Alan T. DeKok [Tue, 5 Mar 2019 21:05:28 +0000 (16:05 -0500)] 
parent node properly, and add a free callback

7 years agoMerge pull request #2553 from jpereira/v4/fix-rbmonkey
Alan DeKok [Tue, 5 Mar 2019 21:03:04 +0000 (16:03 -0500)] 
Merge pull request #2553 from jpereira/v4/fix-rbmonkey

rbmonkey: Fix rbtree_create() call

7 years agorbmonkey: Fix rbtree_create() call 2553/head
Jorge Pereira [Tue, 5 Mar 2019 20:58:44 +0000 (17:58 -0300)] 
rbmonkey: Fix rbtree_create() call

7 years agouse a more consistent error message
Alan T. DeKok [Tue, 5 Mar 2019 20:18:01 +0000 (15:18 -0500)] 
use a more consistent error message

7 years agoradiusd needs a whole lot more things
Alan T. DeKok [Tue, 5 Mar 2019 20:16:48 +0000 (15:16 -0500)] 
radiusd needs a whole lot more things

so it's better to test it later, after the various module
tests, etc.

7 years agoshort names are better
Alan T. DeKok [Tue, 5 Mar 2019 20:16:22 +0000 (15:16 -0500)] 
short names are better

7 years agoMerge pull request #2552 from jpereira/v4/tests.bin
Alan DeKok [Tue, 5 Mar 2019 20:15:25 +0000 (15:15 -0500)] 
Merge pull request #2552 from jpereira/v4/tests.bin

New 'tests.bin' unit test

7 years agoFix missing 'h' for getopt() 2552/head
Jorge Pereira [Tue, 5 Mar 2019 20:06:01 +0000 (17:06 -0300)] 
Fix missing 'h' for getopt()

7 years agoAdd new 'tests.bin' unit test
Jorge Pereira [Tue, 5 Mar 2019 20:07:34 +0000 (17:07 -0300)] 
Add new 'tests.bin' unit test

7 years agoReturn 'EXIT_SUCCESS' during '-h'
Jorge Pereira [Tue, 5 Mar 2019 20:06:47 +0000 (17:06 -0300)] 
Return 'EXIT_SUCCESS' during '-h'

7 years agomore CC_HINT(nonnull)
Alan T. DeKok [Tue, 5 Mar 2019 20:12:14 +0000 (15:12 -0500)] 
more CC_HINT(nonnull)

7 years agoMerge pull request #2551 from jpereira/v4/bin-radict
Alan DeKok [Tue, 5 Mar 2019 19:57:59 +0000 (14:57 -0500)] 
Merge pull request #2551 from jpereira/v4/bin-radict

radict: Return 0 during -h

7 years agoradict: Return 0 during -h 2551/head
Jorge Pereira [Tue, 5 Mar 2019 19:36:51 +0000 (16:36 -0300)] 
radict: Return 0 during -h

7 years agoFix return codes
Arran Cudbard-Bell [Tue, 5 Mar 2019 11:30:32 +0000 (19:30 +0800)] 
Fix return codes

7 years agoFix references to eap.conf
Arran Cudbard-Bell [Tue, 5 Mar 2019 11:01:23 +0000 (19:01 +0800)] 
Fix references to eap.conf

7 years agoDon't do work if the triggers aren't enabled
Arran Cudbard-Bell [Tue, 5 Mar 2019 10:50:22 +0000 (18:50 +0800)] 
Don't do work if the triggers aren't enabled

7 years agoInitialise triggers in unit_test_module
Arran Cudbard-Bell [Tue, 5 Mar 2019 10:49:56 +0000 (18:49 +0800)] 
Initialise triggers in unit_test_module

7 years agoFixup redis tests
Arran Cudbard-Bell [Tue, 5 Mar 2019 10:49:35 +0000 (18:49 +0800)] 
Fixup redis tests

7 years agoSplit the initial spawning phase out of the pool init phase
Arran Cudbard-Bell [Tue, 5 Mar 2019 10:06:59 +0000 (18:06 +0800)] 
Split the initial spawning phase out of the pool init phase

The pool now has additional configuration functions that might need to be called before it starts spawning connections

7 years agoTypo
Arran Cudbard-Bell [Tue, 5 Mar 2019 06:34:22 +0000 (14:34 +0800)] 
Typo

7 years agoIgnore calls to all trigger functions unless trigger_exec_init has been called
Arran Cudbard-Bell [Tue, 5 Mar 2019 05:54:44 +0000 (13:54 +0800)] 
Ignore calls to all trigger functions unless trigger_exec_init has been called

7 years agostubs for testing binary utilities.
Alan T. DeKok [Tue, 5 Mar 2019 02:17:33 +0000 (21:17 -0500)] 
stubs for testing binary utilities.

7 years agomake it work.
Alan T. DeKok [Tue, 5 Mar 2019 02:15:51 +0000 (21:15 -0500)] 
make it work.

we can't use dict_read() to read the protocol dictionaries.
dict_read() loads the file into an existing dictionary, and we
don't want that.

Also don't recurse on directories, because the dictionaries
aren't (yet) smart enough to autoload protocols in subdirectories

7 years agoload using the new dictionary layout
Alan T. DeKok [Tue, 5 Mar 2019 00:59:09 +0000 (19:59 -0500)] 
load using the new dictionary layout

7 years agoMerge pull request #2548 from jpereira/v4/fix-dict-conflict
Alan DeKok [Tue, 5 Mar 2019 00:33:41 +0000 (19:33 -0500)] 
Merge pull request #2548 from jpereira/v4/fix-dict-conflict

Fix the dictionary conflict

7 years agoFix the dictionary conflict 2548/head
Jorge Pereira [Mon, 4 Mar 2019 23:55:44 +0000 (20:55 -0300)] 
Fix the dictionary conflict

7 years agomanually pull over changes from v3
Alan T. DeKok [Mon, 4 Mar 2019 21:46:37 +0000 (16:46 -0500)] 
manually pull over changes from v3

7 years agoMerge pull request #2545 from jpereira/v4/fix-dict
Alan DeKok [Mon, 4 Mar 2019 21:24:04 +0000 (16:24 -0500)] 
Merge pull request #2545 from jpereira/v4/fix-dict

V4/fix dict

7 years agoFix fr_dict_internal_afrom_file() reference 2545/head
Jorge Pereira [Mon, 4 Mar 2019 21:22:38 +0000 (18:22 -0300)] 
Fix fr_dict_internal_afrom_file() reference

7 years agoFix ldap/sync dict calls
Jorge Pereira [Mon, 4 Mar 2019 21:22:17 +0000 (18:22 -0300)] 
Fix ldap/sync dict calls

7 years agoFix radmin dict calls
Jorge Pereira [Mon, 4 Mar 2019 21:21:52 +0000 (18:21 -0300)] 
Fix radmin dict calls

7 years agoload the dictionaries, which are needed to load the config
Alan T. DeKok [Mon, 4 Mar 2019 21:17:37 +0000 (16:17 -0500)] 
load the dictionaries, which are needed to load the config

Add '-D' command-line option to set the dictionary directory.

Don't load the config when passed '-f'.  That's bad form.  Load it
after all configuration options have been parsed.

Add "read dictionary" code.

Move trigger init until after "read dictionary" code

7 years agoMerge pull request #2544 from jpereira/v4/fix-radswho
Alan DeKok [Mon, 4 Mar 2019 21:20:14 +0000 (16:20 -0500)] 
Merge pull request #2544 from jpereira/v4/fix-radswho

Fix radswho dict calls

7 years agoFix radswho dict calls 2544/head
Jorge Pereira [Mon, 4 Mar 2019 21:14:04 +0000 (18:14 -0300)] 
Fix radswho dict calls

7 years agoFix some cosmetic issues in rlm_redis_ippool_tool
Arran Cudbard-Bell [Mon, 4 Mar 2019 17:42:01 +0000 (01:42 +0800)] 
Fix some cosmetic issues in rlm_redis_ippool_tool

7 years agoPrint correct name, and use correct check
Alan T. DeKok [Mon, 4 Mar 2019 14:29:19 +0000 (09:29 -0500)] 
Print correct name, and use correct check

7 years agoMore tests for literals
Arran Cudbard-Bell [Mon, 4 Mar 2019 07:47:22 +0000 (15:47 +0800)] 
More tests for literals

Fix abort on '\' fmt string.

7 years agoMore xlat tests
Arran Cudbard-Bell [Mon, 4 Mar 2019 07:36:52 +0000 (15:36 +0800)] 
More xlat tests

7 years agomove procedure to new file
Alan T. DeKok [Thu, 28 Feb 2019 16:16:37 +0000 (11:16 -0500)] 
move procedure to new file

It's better to have a different file than to ask the admin
to un-comment lots of code.

7 years agoAdd a stored procedure for PostgreSQL rlm_sqlippool.
Nathan Ward [Thu, 28 Feb 2019 02:47:27 +0000 (15:47 +1300)] 
Add a stored procedure for PostgreSQL rlm_sqlippool.

This matches the functionality of the existing example query which returns the users previous IP, if possible, however it runs approx 400x faster.

7 years agowe don't need this any more
Alan T. DeKok [Sat, 2 Mar 2019 18:28:15 +0000 (13:28 -0500)] 
we don't need this any more

7 years agouse parent vendor, not magic vendor
Alan T. DeKok [Sat, 2 Mar 2019 18:27:49 +0000 (13:27 -0500)] 
use parent vendor, not magic vendor

7 years ago"array" types are allowed in multiple places.
Alan T. DeKok [Sat, 2 Mar 2019 18:23:58 +0000 (13:23 -0500)] 
"array" types are allowed in multiple places.

@todo - update the dictionaries with where they are allowed.

7 years agotypos
Alan T. DeKok [Sat, 2 Mar 2019 18:15:03 +0000 (13:15 -0500)] 
typos

7 years agoExit earlier in xlat_tokenize_alternation if the alternate is empty
Arran Cudbard-Bell [Sun, 3 Mar 2019 09:15:35 +0000 (17:15 +0800)] 
Exit earlier in xlat_tokenize_alternation if the alternate is empty

7 years agoRemove const hack in xlat_tokenize_alternation
Arran Cudbard-Bell [Sun, 3 Mar 2019 09:12:08 +0000 (17:12 +0800)] 
Remove const hack in xlat_tokenize_alternation

7 years agoMore precise error messages
Arran Cudbard-Bell [Sun, 3 Mar 2019 09:06:21 +0000 (17:06 +0800)] 
More precise error messages

7 years agoHandle escape sequences in xlat test input/output data
Arran Cudbard-Bell [Sat, 2 Mar 2019 15:29:43 +0000 (23:29 +0800)] 
Handle escape sequences in xlat test input/output data

...and add a few more tests.

Previously \t was treated as two characters (\ + t) which is not what we wanted.

7 years agoremove debug entry
Alan T. DeKok [Fri, 1 Mar 2019 19:29:19 +0000 (14:29 -0500)] 
remove debug entry

7 years agoNot a ptr
Arran Cudbard-Bell [Fri, 1 Mar 2019 16:34:50 +0000 (00:34 +0800)] 
Not a ptr

7 years agoUse isdigit instead of isnumber
Arran Cudbard-Bell [Fri, 1 Mar 2019 16:20:07 +0000 (00:20 +0800)] 
Use isdigit instead of isnumber

7 years agoBetter empty expression check
Arran Cudbard-Bell [Fri, 1 Mar 2019 12:22:14 +0000 (20:22 +0800)] 
Better empty expression check

7 years agoShould replace the existing error
Arran Cudbard-Bell [Fri, 1 Mar 2019 12:16:36 +0000 (20:16 +0800)] 
Should replace the existing error

7 years agoFix another comment
Arran Cudbard-Bell [Fri, 1 Mar 2019 12:12:20 +0000 (20:12 +0800)] 
Fix another comment

7 years agoStray comment
Arran Cudbard-Bell [Fri, 1 Mar 2019 12:10:14 +0000 (20:10 +0800)] 
Stray comment

7 years agoSplit out regex, func, attribute parsers from xlat_tokenize_expansion
Arran Cudbard-Bell [Fri, 1 Mar 2019 12:06:28 +0000 (20:06 +0800)] 
Split out regex, func, attribute parsers from xlat_tokenize_expansion

The logic is almost identical but deals with a few corner cases better

7 years agoGet exact parse errors passed back from tmpl_afrom_attr_str
Arran Cudbard-Bell [Fri, 1 Mar 2019 09:13:41 +0000 (17:13 +0800)] 
Get exact parse errors passed back from tmpl_afrom_attr_str

7 years agoAllow syserror to be explicitly freed
Arran Cudbard-Bell [Fri, 1 Mar 2019 05:50:47 +0000 (13:50 +0800)] 
Allow syserror to be explicitly freed

7 years agoMake the tests work without an internet connection/DNS cache
Arran Cudbard-Bell [Fri, 1 Mar 2019 05:50:27 +0000 (13:50 +0800)] 
Make the tests work without an internet connection/DNS cache

7 years agoUsing the standard fr_strerror functions produces identical errors to passing around...
Arran Cudbard-Bell [Fri, 1 Mar 2019 05:14:51 +0000 (13:14 +0800)] 
Using the standard fr_strerror functions produces identical errors to passing around a static char **error pointer

Error can now be stacked too, which generally gives the user much better context.

7 years agoIn the vast majority of cases we no longer need to modify the input string
Arran Cudbard-Bell [Fri, 1 Mar 2019 02:41:49 +0000 (10:41 +0800)] 
In the vast majority of cases we no longer need to modify the input string

7 years agoas posted to the list
Alan T. DeKok [Thu, 28 Feb 2019 12:39:33 +0000 (07:39 -0500)] 
as posted to the list

7 years agoFix DHCPv6 bool test
Arran Cudbard-Bell [Thu, 28 Feb 2019 10:22:02 +0000 (18:22 +0800)] 
Fix DHCPv6 bool test

Like EAP-SIM, DHCPv6 represents bools by presence (if true), or absence (if false), of the option.