]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
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...
Arran Cudbard-Bell [Thu, 7 Mar 2019 06:19:54 +0000 (14:19 +0800)]
Typo in redis cluster log message
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
Arran Cudbard-Bell [Thu, 7 Mar 2019 06:16:11 +0000 (14:16 +0800)]
don't actually need to set module name
Arran Cudbard-Bell [Thu, 7 Mar 2019 05:48:57 +0000 (13:48 +0800)]
Cleanup log output in rlm_redis_ippool_tool
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...
Arran Cudbard-Bell [Thu, 7 Mar 2019 05:24:05 +0000 (13:24 +0800)]
Switch fr_redis_pipline_free to inline function
Arran Cudbard-Bell [Thu, 7 Mar 2019 05:23:51 +0000 (13:23 +0800)]
Formatting
Arran Cudbard-Bell [Thu, 7 Mar 2019 05:23:44 +0000 (13:23 +0800)]
Rename reply_num to reply_cnt
Arran Cudbard-Bell [Thu, 7 Mar 2019 05:22:49 +0000 (13:22 +0800)]
Formatting
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.
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
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
Arran Cudbard-Bell [Wed, 6 Mar 2019 12:10:51 +0000 (20:10 +0800)]
Fix memory leak in fr_redis_get_version
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.
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
Arran Cudbard-Bell [Wed, 6 Mar 2019 11:49:25 +0000 (19:49 +0800)]
Formatting
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.
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
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...
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
Alan T. DeKok [Wed, 6 Mar 2019 16:21:05 +0000 (11:21 -0500)]
comment out test until we figure out why it fails
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
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
Jorge Pereira [Tue, 5 Mar 2019 23:13:52 +0000 (20:13 -0300)]
The 'make test' should call 'tests.bin' first
Jorge Pereira [Tue, 5 Mar 2019 22:53:41 +0000 (19:53 -0300)]
tests.bin: Add unit_test_attribute test
Jorge Pereira [Tue, 5 Mar 2019 22:15:02 +0000 (19:15 -0300)]
tests.bin: Add tests for smbencrypt result
Jorge Pereira [Tue, 5 Mar 2019 22:04:34 +0000 (19:04 -0300)]
Add length parameter to 'ring_buffer_test'
Jorge Pereira [Tue, 5 Mar 2019 21:54:28 +0000 (18:54 -0300)]
tests.bin: Add radsniff interface list test
Jorge Pereira [Tue, 5 Mar 2019 21:52:17 +0000 (18:52 -0300)]
tests.bin: Add message's set test
Jorge Pereira [Tue, 5 Mar 2019 21:50:12 +0000 (18:50 -0300)]
tests.bin: Add control's test
Jorge Pereira [Tue, 5 Mar 2019 21:48:26 +0000 (18:48 -0300)]
tests.bin: Add queue atomic test
Jorge Pereira [Tue, 5 Mar 2019 21:37:27 +0000 (18:37 -0300)]
tests.bin: Add tests for all binaries
Jorge Pereira [Tue, 5 Mar 2019 21:36:50 +0000 (18:36 -0300)]
Fix the '-h' return to be success
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
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
Jorge Pereira [Tue, 5 Mar 2019 21:14:42 +0000 (18:14 -0300)]
ring_buffer_test: Fix fr_cond_assert() call
Alan T. DeKok [Tue, 5 Mar 2019 21:05:28 +0000 (16:05 -0500)]
parent node properly, and add a free callback
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
Jorge Pereira [Tue, 5 Mar 2019 20:58:44 +0000 (17:58 -0300)]
rbmonkey: Fix rbtree_create() call
Alan T. DeKok [Tue, 5 Mar 2019 20:18:01 +0000 (15:18 -0500)]
use a more consistent error message
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.
Alan T. DeKok [Tue, 5 Mar 2019 20:16:22 +0000 (15:16 -0500)]
short names are better
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
Jorge Pereira [Tue, 5 Mar 2019 20:06:01 +0000 (17:06 -0300)]
Fix missing 'h' for getopt()
Jorge Pereira [Tue, 5 Mar 2019 20:07:34 +0000 (17:07 -0300)]
Add new 'tests.bin' unit test
Jorge Pereira [Tue, 5 Mar 2019 20:06:47 +0000 (17:06 -0300)]
Return 'EXIT_SUCCESS' during '-h'
Alan T. DeKok [Tue, 5 Mar 2019 20:12:14 +0000 (15:12 -0500)]
more CC_HINT(nonnull)
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
Jorge Pereira [Tue, 5 Mar 2019 19:36:51 +0000 (16:36 -0300)]
radict: Return 0 during -h
Arran Cudbard-Bell [Tue, 5 Mar 2019 11:30:32 +0000 (19:30 +0800)]
Fix return codes
Arran Cudbard-Bell [Tue, 5 Mar 2019 11:01:23 +0000 (19:01 +0800)]
Fix references to eap.conf
Arran Cudbard-Bell [Tue, 5 Mar 2019 10:50:22 +0000 (18:50 +0800)]
Don't do work if the triggers aren't enabled
Arran Cudbard-Bell [Tue, 5 Mar 2019 10:49:56 +0000 (18:49 +0800)]
Initialise triggers in unit_test_module
Arran Cudbard-Bell [Tue, 5 Mar 2019 10:49:35 +0000 (18:49 +0800)]
Fixup redis tests
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
Arran Cudbard-Bell [Tue, 5 Mar 2019 06:34:22 +0000 (14:34 +0800)]
Typo
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
Alan T. DeKok [Tue, 5 Mar 2019 02:17:33 +0000 (21:17 -0500)]
stubs for testing binary utilities.
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
Alan T. DeKok [Tue, 5 Mar 2019 00:59:09 +0000 (19:59 -0500)]
load using the new dictionary layout
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
Jorge Pereira [Mon, 4 Mar 2019 23:55:44 +0000 (20:55 -0300)]
Fix the dictionary conflict
Alan T. DeKok [Mon, 4 Mar 2019 21:46:37 +0000 (16:46 -0500)]
manually pull over changes from v3
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
Jorge Pereira [Mon, 4 Mar 2019 21:22:38 +0000 (18:22 -0300)]
Fix fr_dict_internal_afrom_file() reference
Jorge Pereira [Mon, 4 Mar 2019 21:22:17 +0000 (18:22 -0300)]
Fix ldap/sync dict calls
Jorge Pereira [Mon, 4 Mar 2019 21:21:52 +0000 (18:21 -0300)]
Fix radmin dict calls
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
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
Jorge Pereira [Mon, 4 Mar 2019 21:14:04 +0000 (18:14 -0300)]
Fix radswho dict calls
Arran Cudbard-Bell [Mon, 4 Mar 2019 17:42:01 +0000 (01:42 +0800)]
Fix some cosmetic issues in rlm_redis_ippool_tool
Alan T. DeKok [Mon, 4 Mar 2019 14:29:19 +0000 (09:29 -0500)]
Print correct name, and use correct check
Arran Cudbard-Bell [Mon, 4 Mar 2019 07:47:22 +0000 (15:47 +0800)]
More tests for literals
Fix abort on '\' fmt string.
Arran Cudbard-Bell [Mon, 4 Mar 2019 07:36:52 +0000 (15:36 +0800)]
More xlat tests
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.
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.
Alan T. DeKok [Sat, 2 Mar 2019 18:28:15 +0000 (13:28 -0500)]
we don't need this any more
Alan T. DeKok [Sat, 2 Mar 2019 18:27:49 +0000 (13:27 -0500)]
use parent vendor, not magic vendor
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.
Alan T. DeKok [Sat, 2 Mar 2019 18:15:03 +0000 (13:15 -0500)]
typos
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
Arran Cudbard-Bell [Sun, 3 Mar 2019 09:12:08 +0000 (17:12 +0800)]
Remove const hack in xlat_tokenize_alternation
Arran Cudbard-Bell [Sun, 3 Mar 2019 09:06:21 +0000 (17:06 +0800)]
More precise error messages
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.
Alan T. DeKok [Fri, 1 Mar 2019 19:29:19 +0000 (14:29 -0500)]
remove debug entry
Arran Cudbard-Bell [Fri, 1 Mar 2019 16:34:50 +0000 (00:34 +0800)]
Not a ptr
Arran Cudbard-Bell [Fri, 1 Mar 2019 16:20:07 +0000 (00:20 +0800)]
Use isdigit instead of isnumber
Arran Cudbard-Bell [Fri, 1 Mar 2019 12:22:14 +0000 (20:22 +0800)]
Better empty expression check
Arran Cudbard-Bell [Fri, 1 Mar 2019 12:16:36 +0000 (20:16 +0800)]
Should replace the existing error
Arran Cudbard-Bell [Fri, 1 Mar 2019 12:12:20 +0000 (20:12 +0800)]
Fix another comment
Arran Cudbard-Bell [Fri, 1 Mar 2019 12:10:14 +0000 (20:10 +0800)]
Stray comment
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
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
Arran Cudbard-Bell [Fri, 1 Mar 2019 05:50:47 +0000 (13:50 +0800)]
Allow syserror to be explicitly freed
Arran Cudbard-Bell [Fri, 1 Mar 2019 05:50:27 +0000 (13:50 +0800)]
Make the tests work without an internet connection/DNS cache
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.
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
Alan T. DeKok [Thu, 28 Feb 2019 12:39:33 +0000 (07:39 -0500)]
as posted to the list
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.