]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Arran Cudbard-Bell [Sat, 25 Jul 2020 22:09:57 +0000 (18:09 -0400)]
sbuff: Add function to de-escape strings when copying them out of an sbuff
This makes dealing with config strings easier
Arran Cudbard-Bell [Sat, 25 Jul 2020 22:09:23 +0000 (18:09 -0400)]
sbuff: Protect against errant copies
Arran Cudbard-Bell [Sat, 25 Jul 2020 21:34:31 +0000 (17:34 -0400)]
sbuff: Verify length constrained functions terminate output on zero length input
Arran Cudbard-Bell [Sat, 25 Jul 2020 21:32:06 +0000 (17:32 -0400)]
sbuff: Add a char class for hex chars
Arran Cudbard-Bell [Sat, 25 Jul 2020 04:09:40 +0000 (00:09 -0400)]
sbuff: no_trailing should only fail if the trailing char is a digit...
Arran Cudbard-Bell [Sat, 25 Jul 2020 04:05:25 +0000 (00:05 -0400)]
sbuff: Avoid useless loop iteration in fr_sbuff_out_*
Arran Cudbard-Bell [Sat, 25 Jul 2020 04:05:07 +0000 (00:05 -0400)]
sbuff: Fix trailing char detection and uint8_t parsing
Arran Cudbard-Bell [Sat, 25 Jul 2020 01:14:05 +0000 (21:14 -0400)]
sbuff: Add escapes to fr_sbuff_out_bstrncpy_until
Arran Cudbard-Bell [Sat, 25 Jul 2020 00:42:43 +0000 (20:42 -0400)]
sbuff: Add some standard char classes
add support for escapes in fr_sbuff_adv_until
Arran Cudbard-Bell [Fri, 24 Jul 2020 21:48:31 +0000 (17:48 -0400)]
sbuff: Add length constraints to search functions
Alan T. DeKok [Fri, 24 Jul 2020 21:29:28 +0000 (17:29 -0400)]
Revert "round robin listeners among network threads"
This reverts commit
614d0fe5fa45476dd963bf907326f830ac2fd007 .
until we can get travis to build again
Arran Cudbard-Bell [Fri, 24 Jul 2020 17:44:23 +0000 (13:44 -0400)]
sbuff: fr_sbuff_adv_past should really return how many chars they advanced by
Arran Cudbard-Bell [Fri, 24 Jul 2020 16:45:17 +0000 (12:45 -0400)]
debug logging fixes
Arran Cudbard-Bell [Fri, 24 Jul 2020 16:39:49 +0000 (12:39 -0400)]
cond_eval: typo
Arran Cudbard-Bell [Fri, 24 Jul 2020 16:39:37 +0000 (12:39 -0400)]
fix doxygen header
Arran Cudbard-Bell [Fri, 24 Jul 2020 16:38:20 +0000 (12:38 -0400)]
regex: Add flag buffer size
Arran Cudbard-Bell [Fri, 24 Jul 2020 16:33:36 +0000 (12:33 -0400)]
tmpl: Move rules struct def higher
Arran Cudbard-Bell [Fri, 24 Jul 2020 16:32:18 +0000 (12:32 -0400)]
s/VP_ATTR_REF_/TMPL_ATTR_REF_/g
Arran Cudbard-Bell [Fri, 24 Jul 2020 16:29:28 +0000 (12:29 -0400)]
s/tmpl_define_undefined_attr/tmpl_unparsed_attr_add/g
Arran Cudbard-Bell [Fri, 24 Jul 2020 15:40:40 +0000 (11:40 -0400)]
s/allow_undefined/allow_unparsed/
Alan T. DeKok [Fri, 24 Jul 2020 15:07:40 +0000 (11:07 -0400)]
round robin listeners among network threads
Arran Cudbard-Bell [Fri, 24 Jul 2020 14:59:31 +0000 (10:59 -0400)]
sbuff: Add fr_sbuff_adv_past_allowed && fr_sbuff_adv_until
Arran Cudbard-Bell [Fri, 24 Jul 2020 04:10:13 +0000 (00:10 -0400)]
sbuff: Less confusing macro name
Alan T. DeKok [Fri, 24 Jul 2020 14:55:52 +0000 (10:55 -0400)]
add each worker to all network threads
Matthew Newton [Fri, 24 Jul 2020 13:11:47 +0000 (14:11 +0100)]
Use new Antora UI for documentation
Arran Cudbard-Bell [Thu, 23 Jul 2020 23:32:08 +0000 (19:32 -0400)]
sbuff: Add talloc wrapper variants of fr_sbuff_out functions
Arran Cudbard-Bell [Thu, 23 Jul 2020 22:52:38 +0000 (18:52 -0400)]
sbuff: Fix advancement functions to return position, and add tests
Alan T. DeKok [Thu, 23 Jul 2020 22:29:41 +0000 (18:29 -0400)]
initialize from the correct fields
There are still issues stopping networks when more than one exists.
that will need to be tracked down later.
Arran Cudbard-Bell [Thu, 23 Jul 2020 21:10:18 +0000 (17:10 -0400)]
sbuff: add fr_sbuff_adv_to_strcase and fix all functions to support streaming
Arran Cudbard-Bell [Thu, 23 Jul 2020 16:51:26 +0000 (12:51 -0400)]
sbuff: Consistently subtract one from buffer len when setting the end pointer
Fix fr_sbuff_adv_past_str and fr_sbuff_adv_past_strcase to work with streaming buffers.
Alan T. DeKok [Thu, 23 Jul 2020 15:43:25 +0000 (11:43 -0400)]
manual pull of
bc339a4c10
Arran Cudbard-Bell [Thu, 23 Jul 2020 15:22:32 +0000 (11:22 -0400)]
sbuff: Add tests for bstrncpy_until
Arran Cudbard-Bell [Thu, 23 Jul 2020 15:04:05 +0000 (11:04 -0400)]
sbuff: Initialise temporary sbuffs with additional trailing byte when using strlen
Arran Cudbard-Bell [Thu, 23 Jul 2020 14:44:37 +0000 (10:44 -0400)]
sbuff: Ensure buffers are always terminated
Alan T. DeKok [Thu, 23 Jul 2020 14:07:25 +0000 (10:07 -0400)]
make sure that Acct-Unique-Session-Id is a printable string
and add comments explain what we're doing, and why.
Arran Cudbard-Bell [Wed, 22 Jul 2020 22:30:36 +0000 (18:30 -0400)]
sbuff: Remove talloc variants and output using sbuffs instead
Alan T. DeKok [Wed, 22 Jul 2020 21:40:14 +0000 (17:40 -0400)]
typo
Alan T. DeKok [Wed, 22 Jul 2020 13:56:59 +0000 (09:56 -0400)]
update as per module config
Alan T. DeKok [Wed, 22 Jul 2020 13:10:56 +0000 (09:10 -0400)]
use the ID for calculating CHAP.
We do NOT want to skip that. It's BAD!
Add test cases so that this doesn't happen again.
Arran Cudbard-Bell [Tue, 21 Jul 2020 22:27:27 +0000 (18:27 -0400)]
sbuff: Quiet clang scan
Alan T. DeKok [Tue, 21 Jul 2020 21:28:07 +0000 (17:28 -0400)]
clarify and use English words
Alan T. DeKok [Tue, 21 Jul 2020 19:23:33 +0000 (15:23 -0400)]
enforce non-zero cleanup delay when tracking duplicates
Carl Tashian [Tue, 21 Jul 2020 20:49:57 +0000 (15:49 -0500)]
Small docs change ("blacklist" -> "blocklist") (#3531)
Per best current practice in https://tools.ietf.org/id/draft-knodel-terminology-01.html
Arran Cudbard-Bell [Tue, 21 Jul 2020 20:32:02 +0000 (16:32 -0400)]
sbuff: Allow dynamic re-allocation of sbuffs
Terry Burton [Tue, 21 Jul 2020 19:33:37 +0000 (20:33 +0100)]
certs: Documentation fixes and Makefile tweaks (#3530)
* certs: Refer to correct Makefile targets and file locations for RSA vs ECC
* certs: Don't clobber a user's RSA cert with their ECC cert
* certs: Reorder the deps for the Makefile targets
Makes the output of running `make` more logical: First the all the CA
certs steps, then the server cert steps, then the client cert steps.
Alan T. DeKok [Tue, 21 Jul 2020 19:15:54 +0000 (15:15 -0400)]
push duplicate replies into the "replies" heap
instead of the waiting heap. Which lets them be written as soon
as the network event loop is serviced.
Also set their priority to PRIORITY_NOW, so that they are sent
out before replies to later packets.
Alan T. DeKok [Tue, 21 Jul 2020 19:15:34 +0000 (15:15 -0400)]
remove "todo" which has been done
Alan T. DeKok [Tue, 21 Jul 2020 16:19:49 +0000 (12:19 -0400)]
split off sent and received
in order to see retransmissions
Alan T. DeKok [Tue, 21 Jul 2020 15:36:40 +0000 (11:36 -0400)]
print out actual count, not just expected count
Alan T. DeKok [Tue, 21 Jul 2020 14:51:36 +0000 (10:51 -0400)]
actually set that it's in the dedup tree...
Alan T. DeKok [Tue, 21 Jul 2020 14:13:21 +0000 (10:13 -0400)]
free request if we receive erroneous duplicate
Alan T. DeKok [Tue, 21 Jul 2020 13:37:34 +0000 (09:37 -0400)]
check length of tracking structure, too
and ignore duplicates while the client is pending
Alan T. DeKok [Tue, 21 Jul 2020 13:26:13 +0000 (09:26 -0400)]
use strdup instead of bstrdup_buffer. Fixes #3528
as the second function expects the string to be talloc'd,
and it isn't.
Alan T. DeKok [Tue, 21 Jul 2020 13:25:51 +0000 (09:25 -0400)]
whitespace
becausemanglingthingstogethermakesithardtoread
Alan T. DeKok [Tue, 21 Jul 2020 03:04:48 +0000 (23:04 -0400)]
packet_len is unused
if we get RADIUS packets of less than 20 bytes, then everything
else is broken
Alan T. DeKok [Tue, 21 Jul 2020 02:27:41 +0000 (22:27 -0400)]
make C compiler happy
Alan T. DeKok [Tue, 21 Jul 2020 02:27:23 +0000 (22:27 -0400)]
select network from connection or thread
Alan T. DeKok [Tue, 21 Jul 2020 02:21:05 +0000 (22:21 -0400)]
add tracking table for DHCPv6
by packet code, transaction ID, and (if available) client id
note that we don't care what the client ID is, we just compare
it as an opaque binary blob. Which isn't perfect, but should be
good enough for our intents and purposes
Alan T. DeKok [Tue, 21 Jul 2020 01:53:29 +0000 (21:53 -0400)]
typo
Alan T. DeKok [Tue, 21 Jul 2020 00:10:29 +0000 (20:10 -0400)]
loop over s->waiting, even if there is not a pending packet
Alan T. DeKok [Mon, 20 Jul 2020 23:08:29 +0000 (19:08 -0400)]
implement dedup.
the old master.c never called rbtree_insert(). Oops.
The new code does that, and also abstracts the dedup parameters.
There is now a new function which creates a dedup tracking structure.
For RADIUS this is the first 20 bytes of the packet. For DHCPv4
it is the XID, CHADDR, and message type code. Having a separate
structure means that we don't have to search through the entire
packet every time we do rbtree comparisons.
Arran Cudbard-Bell [Mon, 20 Jul 2020 16:00:43 +0000 (12:00 -0400)]
sbuff/dbuff: Add marker advance/set poistion functions
Arran Cudbard-Bell [Mon, 20 Jul 2020 15:59:21 +0000 (11:59 -0400)]
talloc: Print useful error if we fail to append a string
Alan T. DeKok [Mon, 20 Jul 2020 15:02:18 +0000 (11:02 -0400)]
dedup dhcpv4 packets
Alan T. DeKok [Mon, 20 Jul 2020 14:30:51 +0000 (10:30 -0400)]
allow duplicates of auto-numbered attributes
only if the fields, names, and types are the same
Alan T. DeKok [Mon, 20 Jul 2020 12:46:41 +0000 (08:46 -0400)]
instance name is in the parent section
now that we've put the "group" config items into their own
sub-section
Arran Cudbard-Bell [Mon, 20 Jul 2020 02:26:56 +0000 (22:26 -0400)]
sbuff/dbuff: Use compound literals as initialisers
Arran Cudbard-Bell [Mon, 20 Jul 2020 02:07:24 +0000 (22:07 -0400)]
sbuff: Start of stream parsing and extensible buffers
Alan T. DeKok [Sun, 19 Jul 2020 12:19:56 +0000 (08:19 -0400)]
check return code so we don't encode negative numbers
Alan T. DeKok [Sun, 19 Jul 2020 10:49:54 +0000 (06:49 -0400)]
format to 72 characters as infinite line lenths are deprecated
and do minor word smithing
Alan T. DeKok [Fri, 17 Jul 2020 12:36:12 +0000 (08:36 -0400)]
whitespace
Alan T. DeKok [Fri, 17 Jul 2020 12:12:29 +0000 (08:12 -0400)]
fix typo
Arran Cudbard-Bell [Sun, 19 Jul 2020 03:50:15 +0000 (23:50 -0400)]
sbuff/dbuff: Reduce the number of arguments needed for markers
Arran Cudbard-Bell [Sat, 18 Jul 2020 20:20:05 +0000 (16:20 -0400)]
sbuff/dbuff: Formatting
Arran Cudbard-Bell [Sat, 18 Jul 2020 20:15:10 +0000 (16:15 -0400)]
dbuff: Add uint8_t/int8_t to fr_dbuff_in
Arran Cudbard-Bell [Sat, 18 Jul 2020 20:11:26 +0000 (16:11 -0400)]
dbuff: Switch to using fr_dbuff_set where we're not using relative offsets
Arran Cudbard-Bell [Sat, 18 Jul 2020 20:06:20 +0000 (16:06 -0400)]
dbuff/sbuff: Shuffle functions so they're in the same order
Arran Cudbard-Bell [Sat, 18 Jul 2020 19:26:23 +0000 (15:26 -0400)]
dbuff: Add fr_dbuff_set
Arran Cudbard-Bell [Sat, 18 Jul 2020 19:25:38 +0000 (15:25 -0400)]
sbuff: Use the same marker code as dbuffs
Arran Cudbard-Bell [Sat, 18 Jul 2020 18:49:06 +0000 (14:49 -0400)]
dbuff: Fix various issues with dbuff markers
Arran Cudbard-Bell [Sat, 18 Jul 2020 18:08:06 +0000 (14:08 -0400)]
dbuff: Add marker support
Arran Cudbard-Bell [Sat, 18 Jul 2020 18:07:54 +0000 (14:07 -0400)]
sbuff: Formatting
Arran Cudbard-Bell [Fri, 17 Jul 2020 21:53:34 +0000 (17:53 -0400)]
sbuff: General tidying
Arran Cudbard-Bell [Fri, 17 Jul 2020 19:25:02 +0000 (15:25 -0400)]
sbuff: Add additional sbuff functions
Arran Cudbard-Bell [Fri, 17 Jul 2020 19:23:55 +0000 (15:23 -0400)]
dbuff: Allow dbuffs to wrap string buffers
Arran Cudbard-Bell [Fri, 17 Jul 2020 18:24:41 +0000 (14:24 -0400)]
Need room for the CIDR separator in FR_IPADDR_PREFIX_STRLEN
James Jones [Fri, 17 Jul 2020 18:17:18 +0000 (13:17 -0500)]
Add dbuff.adoc (#3524)
* Add dbuff.adoc
* Formatting and restructuring
Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
Alan T. DeKok [Fri, 17 Jul 2020 12:03:19 +0000 (08:03 -0400)]
port fixes from v3
Alan T. DeKok [Fri, 17 Jul 2020 12:03:10 +0000 (08:03 -0400)]
word smithing
James Jones [Thu, 16 Jul 2020 21:56:46 +0000 (16:56 -0500)]
Convert dhcpv4 encoding to use dbuff (#3492)
Arran Cudbard-Bell [Thu, 16 Jul 2020 18:35:31 +0000 (11:35 -0700)]
dbuff: Cast narrower width sizes to size_t
James Jones [Wed, 15 Jul 2020 22:51:46 +0000 (17:51 -0500)]
Convert DHCPv6 encoding to use dbuff (#3493)
Note: the conversion is not complete; fr_struct_to_network() expects a ptr/len value
encoder, which means one can't write a simple dbuff layer around it, and ARP,
DHCPv4, and DHCPv6 all use it. encode_value() thus remains as is for now, with a
dbuff-flavored wrapper.
James Jones [Wed, 15 Jul 2020 22:44:42 +0000 (17:44 -0500)]
Convert radius encode functions to use dbuff (#3463)
The conversion is not complete; encode_value() must wait until
fr_struct_to_network(), which radius, dhcpv6, and arp use, can be
converted to use dbuff.
Arran Cudbard-Bell [Wed, 15 Jul 2020 18:26:51 +0000 (11:26 -0700)]
time: Should be seconds since the epoch
Alan T. DeKok [Wed, 15 Jul 2020 17:31:44 +0000 (13:31 -0400)]
fix typo
Alan T. DeKok [Wed, 15 Jul 2020 16:38:17 +0000 (12:38 -0400)]
read filenames in sorted order
instead of the in-directory order, which may be almost random.
There's no particular reason to choose alphabetical order, other
than it's a fixed sort, and easy to explain.
Note that we do NOT use scanddir(), as it returns duplicate
filenames on OSX.
Arran Cudbard-Bell [Tue, 14 Jul 2020 02:22:27 +0000 (19:22 -0700)]
More compiler quietening
Arran Cudbard-Bell [Tue, 14 Jul 2020 01:56:46 +0000 (18:56 -0700)]
mark up function strftime args
Arran Cudbard-Bell [Tue, 14 Jul 2020 01:25:37 +0000 (18:25 -0700)]
time: Add strftime wrappers
Arran Cudbard-Bell [Mon, 13 Jul 2020 19:45:24 +0000 (12:45 -0700)]
dbuff: Don't allow copying off the end of the input dbuff