]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agoRemove unused variable
Jorge Pereira [Thu, 31 Oct 2019 20:41:07 +0000 (17:41 -0300)] 
Remove unused variable

6 years agoThe 'IA-PD' time fields should be 'time_delta'
Jorge Pereira [Thu, 31 Oct 2019 21:20:21 +0000 (18:20 -0300)] 
The 'IA-PD' time fields should be 'time_delta'

6 years agofree on error
Alan T. DeKok [Thu, 31 Oct 2019 20:19:46 +0000 (16:19 -0400)] 
free on error

6 years agoauto-generate VALUEs for Option-Request
Alan T. DeKok [Thu, 31 Oct 2019 20:00:41 +0000 (16:00 -0400)] 
auto-generate VALUEs for Option-Request

6 years agoadd API to iterate over children of an attribute
Alan T. DeKok [Thu, 31 Oct 2019 19:59:41 +0000 (15:59 -0400)] 
add API to iterate over children of an attribute

6 years agominor tweaks to dictionaries
Alan T. DeKok [Thu, 31 Oct 2019 19:30:12 +0000 (15:30 -0400)] 
minor tweaks to dictionaries

6 years agoallow 'length=uint16' as a flag
Alan T. DeKok [Thu, 31 Oct 2019 19:06:48 +0000 (15:06 -0400)] 
allow 'length=uint16' as a flag

This is mainly for DHCPv6, but it allows us to auto-encode lengths
inside of structs too, which wasn't previously possible.

6 years agowe can have time_delta fields in dictionaries
Alan T. DeKok [Thu, 31 Oct 2019 18:32:02 +0000 (14:32 -0400)] 
we can have time_delta fields in dictionaries

6 years agoFix the dhcpdv6 unit test
Jorge Pereira [Thu, 31 Oct 2019 19:20:07 +0000 (16:20 -0300)] 
Fix the dhcpdv6 unit test

6 years agoadd comment saysing where we get these VALUEs from
Alan T. DeKok [Thu, 31 Oct 2019 18:26:25 +0000 (14:26 -0400)] 
add comment saysing where we get these VALUEs from

6 years agoThe 'Option-Request' expects only a valid option number
Jorge Pereira [Thu, 31 Oct 2019 17:58:09 +0000 (14:58 -0300)] 
The 'Option-Request' expects only a valid option number

6 years agoThe 'Option-Request' should be array of uint16
Jorge Pereira [Thu, 31 Oct 2019 17:55:45 +0000 (14:55 -0300)] 
The 'Option-Request' should be array of uint16

6 years agoThe 'Rapid-Commit' should be 'octets'
Jorge Pereira [Thu, 31 Oct 2019 18:21:49 +0000 (15:21 -0300)] 
The 'Rapid-Commit' should be 'octets'

6 years agoabstract away the key_field
Alan T. DeKok [Thu, 31 Oct 2019 17:47:39 +0000 (13:47 -0400)] 
abstract away the key_field

which is now "extra" flag + subtype

and the protocols look at "subtype" only when "extra" is not set

6 years agobetter error messages and notes for the future
Alan T. DeKok [Thu, 31 Oct 2019 17:37:54 +0000 (13:37 -0400)] 
better error messages and notes for the future

6 years agomove RADIUS "long extended" flag to the "subtype" field
Alan T. DeKok [Thu, 31 Oct 2019 17:17:34 +0000 (13:17 -0400)] 
move RADIUS "long extended" flag to the "subtype" field

which frees up "extra" for other meanings

6 years agoadd fr_dns_label_network_network_length()
Alan T. DeKok [Thu, 31 Oct 2019 14:40:27 +0000 (10:40 -0400)] 
add fr_dns_label_network_network_length()

which doesn't dereference the labels

6 years agocheck length
Alan T. DeKok [Thu, 31 Oct 2019 14:06:08 +0000 (10:06 -0400)] 
check length

6 years agoEmulate fopencookie so we don't need boilerplate everywhere where it's used
Arran Cudbard-Bell [Thu, 31 Oct 2019 15:51:56 +0000 (09:51 -0600)] 
Emulate fopencookie so we don't need boilerplate everywhere where it's used

6 years agoAdd values for 'Reconf-Msg' attribute in rfc3315 dictionary (#3087)
Jorge Pereira [Thu, 31 Oct 2019 00:44:20 +0000 (21:44 -0300)] 
Add values for 'Reconf-Msg' attribute in rfc3315 dictionary (#3087)

6 years agoRequire a version of libunbound that exposes an interface that allows us to integrate...
Arran Cudbard-Bell [Wed, 30 Oct 2019 22:50:51 +0000 (16:50 -0600)] 
Require a version of libunbound that exposes an interface that allows us to integrate our own event loop

6 years agoMinor style fixups
Arran Cudbard-Bell [Wed, 30 Oct 2019 22:05:40 +0000 (16:05 -0600)] 
Minor style fixups

6 years agoUntested async io integration layer for libunbound
Arran Cudbard-Bell [Wed, 30 Oct 2019 22:05:23 +0000 (16:05 -0600)] 
Untested async io integration layer for libunbound

6 years agocorrect hex encoding of option
Alan T. DeKok [Wed, 30 Oct 2019 21:53:46 +0000 (17:53 -0400)] 
correct hex encoding of option

so that we don't have overflows

6 years agocheck input length against minimum size
Alan T. DeKok [Wed, 30 Oct 2019 21:18:06 +0000 (17:18 -0400)] 
check input length against minimum size

6 years agoalways search to the end of the buffer
Alan T. DeKok [Wed, 30 Oct 2019 20:09:08 +0000 (16:09 -0400)] 
always search to the end of the buffer

6 years agocheck length before dereferencing it
Alan T. DeKok [Wed, 30 Oct 2019 20:08:49 +0000 (16:08 -0400)] 
check length before dereferencing it

6 years agocheck for message type having length 0
Alan T. DeKok [Wed, 30 Oct 2019 20:04:36 +0000 (16:04 -0400)] 
check for message type having length 0

6 years agocasting for compiler
Alan T. DeKok [Wed, 30 Oct 2019 19:37:46 +0000 (15:37 -0400)] 
casting for compiler

6 years agocheck more option length correctly
Alan T. DeKok [Wed, 30 Oct 2019 19:35:41 +0000 (15:35 -0400)] 
check more option length correctly

6 years agocheck option length correctly
Alan T. DeKok [Wed, 30 Oct 2019 18:11:04 +0000 (14:11 -0400)] 
check option length correctly

6 years agoadd packet decode test point for DHCPv4
Alan T. DeKok [Wed, 30 Oct 2019 17:51:35 +0000 (13:51 -0400)] 
add packet decode test point for DHCPv4

6 years agospeed up the build when doxygen files exist
Alan T. DeKok [Wed, 30 Oct 2019 17:27:18 +0000 (13:27 -0400)] 
speed up the build when doxygen files exist

doxygen creates a million files, and we don't want to do
automatic HTML conversion, etc.  But we do want to install
the files.  So exclude the doxygen files the various GNU make
magic that we do for transforming things.  And instead just
rely on `cp` for installation.

6 years agoadd decode VSAs to DHCPv6
Alan T. DeKok [Wed, 30 Oct 2019 13:55:24 +0000 (09:55 -0400)] 
add decode VSAs to DHCPv6

6 years agomore convert complex to struct
Alan T. DeKok [Wed, 30 Oct 2019 12:15:41 +0000 (08:15 -0400)] 
more convert complex to struct

6 years agoconvert complex field to struct
Alan T. DeKok [Wed, 30 Oct 2019 12:04:01 +0000 (08:04 -0400)] 
convert complex field to struct

Mostly. The struct decoder still doesn't do DNS labels, so that
has to be fixed

6 years agopartially decode Vendor-Class
Alan T. DeKok [Wed, 30 Oct 2019 11:58:15 +0000 (07:58 -0400)] 
partially decode Vendor-Class

6 years agoAdded some more documentation and implementation restrictions.
Jan Hugo Prins [Thu, 24 Oct 2019 16:00:45 +0000 (18:00 +0200)] 
Added some more documentation and implementation restrictions.

6 years agodecode Auth option
Alan T. DeKok [Wed, 30 Oct 2019 11:34:31 +0000 (07:34 -0400)] 
decode Auth option

6 years agoremove checks that are no longer necessary
Alan T. DeKok [Wed, 30 Oct 2019 11:32:14 +0000 (07:32 -0400)] 
remove checks that are no longer necessary

the parser no longer depends on "previous" to define STRUCT,
as they can be defined in-place as ATTRIBUTE of type 'struct'

6 years agodecode Status-Code option. Fixes #3800
Alan T. DeKok [Wed, 30 Oct 2019 11:19:31 +0000 (07:19 -0400)] 
decode Status-Code option.  Fixes #3800

And add values to it.

6 years agoadded decode_proto test point, and dhcpv6 fuzzer
Alan T. DeKok [Tue, 29 Oct 2019 18:41:31 +0000 (14:41 -0400)] 
added decode_proto test point, and dhcpv6 fuzzer

6 years agoload internal dictionary, too
Alan T. DeKok [Tue, 29 Oct 2019 18:29:50 +0000 (14:29 -0400)] 
load internal dictionary, too

6 years agoupdate email address for copyright
Alan T. DeKok [Tue, 29 Oct 2019 18:34:39 +0000 (14:34 -0400)] 
update email address for copyright

6 years agodelay allocation of tmp_ctx until we need it
Alan T. DeKok [Tue, 29 Oct 2019 18:34:19 +0000 (14:34 -0400)] 
delay allocation of tmp_ctx until we need it

6 years agotypo
Alan T. DeKok [Tue, 29 Oct 2019 12:44:30 +0000 (08:44 -0400)] 
typo

6 years agotransaction ID is 24 bits, so make it uint32
Alan T. DeKok [Tue, 29 Oct 2019 12:43:42 +0000 (08:43 -0400)] 
transaction ID is 24 bits, so make it uint32

6 years agostart of DHCPv6 packet decoder
Alan T. DeKok [Tue, 29 Oct 2019 12:19:36 +0000 (08:19 -0400)] 
start of DHCPv6 packet decoder

6 years agodoxygen
Alan T. DeKok [Tue, 29 Oct 2019 10:43:10 +0000 (06:43 -0400)] 
doxygen

6 years agoadd server tests, too. Fixes #3079
Alan T. DeKok [Tue, 29 Oct 2019 01:46:12 +0000 (21:46 -0400)] 
add server tests, too.  Fixes #3079

6 years agomove tests around and add some more tests
Alan T. DeKok [Tue, 29 Oct 2019 01:44:15 +0000 (21:44 -0400)] 
move tests around and add some more tests

6 years agoAdd tests for DHCPv6 / rfc6355
Jorge Pereira [Thu, 24 Oct 2019 17:22:23 +0000 (14:22 -0300)] 
Add tests for DHCPv6 / rfc6355

6 years agoAdd tests for DHCPv6 / rfc3315
Jorge Pereira [Tue, 29 Oct 2019 00:49:42 +0000 (21:49 -0300)] 
Add tests for DHCPv6 / rfc3315

6 years agoadded debug for decoding
Alan T. DeKok [Tue, 29 Oct 2019 01:25:12 +0000 (21:25 -0400)] 
added debug for decoding

6 years agoadd debug for decoding. and don't decode an attribute of size zero
Alan T. DeKok [Tue, 29 Oct 2019 01:24:40 +0000 (21:24 -0400)] 
add debug for decoding.  and don't decode an attribute of size zero

6 years agoprint out buffer we encoded, not the buffer remaining
Alan T. DeKok [Tue, 29 Oct 2019 01:23:59 +0000 (21:23 -0400)] 
print out buffer we encoded, not the buffer remaining

6 years agouse legal@networkradius.com for legal text
Alan T. DeKok [Mon, 28 Oct 2019 12:37:33 +0000 (08:37 -0400)] 
use legal@networkradius.com for legal text

6 years agocreate protocol-specific fuzzers
Alan T. DeKok [Mon, 28 Oct 2019 12:32:16 +0000 (08:32 -0400)] 
create protocol-specific fuzzers

6 years agomore convert octets to struct
Alan T. DeKok [Sun, 27 Oct 2019 21:29:22 +0000 (17:29 -0400)] 
more convert octets to struct

6 years agomore convert octets to struct
Alan T. DeKok [Sun, 27 Oct 2019 21:22:47 +0000 (17:22 -0400)] 
more convert octets to struct

6 years agomove octets to struct
Alan T. DeKok [Sun, 27 Oct 2019 13:53:50 +0000 (09:53 -0400)] 
move octets to struct

note that we don't (yet) support encoding or decoding of dns labels
inside of a struct.  We should really fix that.

6 years agoenforce flags only on RADIUS
Alan T. DeKok [Sun, 27 Oct 2019 13:53:26 +0000 (09:53 -0400)] 
enforce flags only on RADIUS

6 years agomove octets to struct
Alan T. DeKok [Sun, 27 Oct 2019 13:48:42 +0000 (09:48 -0400)] 
move octets to struct

6 years agoconvert octets to struct
Alan T. DeKok [Sun, 27 Oct 2019 13:40:43 +0000 (09:40 -0400)] 
convert octets to struct

6 years agoconvert octets to struct
Alan T. DeKok [Sun, 27 Oct 2019 13:34:17 +0000 (09:34 -0400)] 
convert octets to struct

6 years agoswap contents so that they are correct
Alan T. DeKok [Sun, 27 Oct 2019 13:16:40 +0000 (09:16 -0400)] 
swap contents so that they are correct

6 years agofix tests for unknown attrs in struct
Alan T. DeKok [Sun, 27 Oct 2019 13:13:53 +0000 (09:13 -0400)] 
fix tests for unknown attrs in struct

and fix code :(

6 years agodecode more structs
Alan T. DeKok [Sun, 27 Oct 2019 13:02:08 +0000 (09:02 -0400)] 
decode more structs

6 years agomark up more attributes as being DNS label
Alan T. DeKok [Sun, 27 Oct 2019 12:49:32 +0000 (08:49 -0400)] 
mark up more attributes as being DNS label

6 years agoyes, encode of unknown fields in structs works
Alan T. DeKok [Sat, 26 Oct 2019 21:52:55 +0000 (17:52 -0400)] 
yes, encode of unknown fields in structs works

6 years agodecode unknown key fields, too
Alan T. DeKok [Sat, 26 Oct 2019 13:47:41 +0000 (09:47 -0400)] 
decode unknown key fields, too

6 years agodecode structs, too
Alan T. DeKok [Fri, 25 Oct 2019 19:57:02 +0000 (15:57 -0400)] 
decode structs, too

6 years agoglue for VSAs
Alan T. DeKok [Fri, 25 Oct 2019 18:50:36 +0000 (14:50 -0400)] 
glue for VSAs

6 years agoscan fixes
Alan T. DeKok [Fri, 25 Oct 2019 18:46:38 +0000 (14:46 -0400)] 
scan fixes

6 years agomove clang checks to where they belong. Fixes #3074
Alan T. DeKok [Fri, 25 Oct 2019 18:09:46 +0000 (14:09 -0400)] 
move clang checks to where they belong.  Fixes #3074

6 years agowhoops, fix this, too
Alan T. DeKok [Fri, 25 Oct 2019 16:02:16 +0000 (12:02 -0400)] 
whoops, fix this, too

6 years agoset default type size / length in fr_dict_t
Alan T. DeKok [Fri, 25 Oct 2019 15:29:29 +0000 (11:29 -0400)] 
set default type size / length in fr_dict_t

so that the dict tokenizer uses that instead of hard-coded '1'.

And change the BEGIN-VENDOR to use "parent=..." instead of
"format=..".  As the reference is to a parent attribute, NOT
to a particular format.

The VSA encoding flags should really be part of the BEGIN-VENDOR
line, as that is protocol-specific.  Right now they're in the
VENDOR, which unfortunatelty is used across multiple protocols.

We probably want to update the code to look for encoding sizes
in the VENDOR attribute, and not in the fr_dict_vendor_t

6 years agobetter way to define vsa_parent.
Alan T. DeKok [Fri, 25 Oct 2019 15:19:37 +0000 (11:19 -0400)] 
better way to define vsa_parent.

which is dynamic, and doesn't require magic numbers

6 years agocorrectly encode VSAs in DHCPv6.
Alan T. DeKok [Fri, 25 Oct 2019 15:05:42 +0000 (11:05 -0400)] 
correctly encode VSAs in DHCPv6.

And update the unit test to match.

6 years agoadd BEGIN-VENDOR to DHCPv6 dictionary.
Alan T. DeKok [Fri, 25 Oct 2019 14:54:38 +0000 (10:54 -0400)] 
add BEGIN-VENDOR to DHCPv6 dictionary.

and make the dictionary parser allow VSAs to be added to the
DHCPv6 Vendor-Opts attribute. :(

6 years agoadd note to decode unknown fields
Alan T. DeKok [Fri, 25 Oct 2019 14:53:08 +0000 (10:53 -0400)] 
add note to decode unknown fields

once we've done a bit more work to allow unknown da's as children
of a struct.  It might work, but it's untested.

6 years agoAdd tests for DHCPv6 / rfc3646
Jorge Pereira [Fri, 25 Oct 2019 00:25:36 +0000 (21:25 -0300)] 
Add tests for DHCPv6 / rfc3646

6 years agoThe 'Domain-List' value should be string
Jorge Pereira [Fri, 25 Oct 2019 00:26:29 +0000 (21:26 -0300)] 
The 'Domain-List' value should be string

As described in https://tools.ietf.org/html/rfc1035#section-3.1

Domain names in messages are expressed in terms of a sequence of labels.
Each label is represented as a one octet length field followed by that
number of octets.  Since every domain name ends with the null label of
the root, a domain name is terminated by a length byte of zero.

i.e: It should be encoded as a 'dns_label' to append the '\0'

6 years agoValidate larger dns labels
Jorge Pereira [Wed, 23 Oct 2019 00:14:48 +0000 (21:14 -0300)] 
Validate larger dns labels

6 years agoadded Microsoft dictionary
Alan T. DeKok [Fri, 25 Oct 2019 14:15:22 +0000 (10:15 -0400)] 
added Microsoft dictionary

6 years agoDHCPv6 VSAs can only occur in the standard format.
Alan T. DeKok [Fri, 25 Oct 2019 14:02:28 +0000 (10:02 -0400)] 
DHCPv6 VSAs can only occur in the standard format.

6 years agodecode DHCPv6 arrays. and update tests
Alan T. DeKok [Fri, 25 Oct 2019 13:22:55 +0000 (09:22 -0400)] 
decode DHCPv6 arrays.  and update tests

6 years agoadd decode tests, too
Alan T. DeKok [Fri, 25 Oct 2019 11:11:46 +0000 (07:11 -0400)] 
add decode tests, too

6 years agofree vp after dereferencing it
Alan T. DeKok [Fri, 25 Oct 2019 11:10:07 +0000 (07:10 -0400)] 
free vp after dereferencing it

6 years agocomment out 4to6 test. It doesn't pass on travis
Alan T. DeKok [Fri, 25 Oct 2019 10:57:50 +0000 (06:57 -0400)] 
comment out 4to6 test.  It doesn't pass on travis

which as 4to6 resolution turned off

6 years agoDNS labels in DHCPv6 MUST NOT be compressed
Alan T. DeKok [Fri, 25 Oct 2019 01:08:36 +0000 (21:08 -0400)] 
DNS labels in DHCPv6 MUST NOT be compressed

https://tools.ietf.org/html/rfc8415#section-10

6 years agouse tmp_ctx for unknown da's
Alan T. DeKok [Thu, 24 Oct 2019 19:19:10 +0000 (15:19 -0400)] 
use tmp_ctx for unknown da's

6 years agodecode hardware-type ethernet
Alan T. DeKok [Thu, 24 Oct 2019 18:27:19 +0000 (14:27 -0400)] 
decode hardware-type ethernet

6 years agoremove unused assignments
Alan T. DeKok [Thu, 24 Oct 2019 17:02:17 +0000 (13:02 -0400)] 
remove unused assignments

6 years agoremove unused variable
Alan T. DeKok [Thu, 24 Oct 2019 14:39:12 +0000 (10:39 -0400)] 
remove unused variable

6 years agoDrop DHCP-Hardware-Type types with values greater than 255
Jorge Pereira [Thu, 24 Oct 2019 21:03:19 +0000 (18:03 -0300)] 
Drop DHCP-Hardware-Type types with values greater than 255

6 years agoUpdate the hardware-type list
Jorge Pereira [Thu, 24 Oct 2019 17:46:45 +0000 (14:46 -0300)] 
Update the hardware-type list

It was extracted from the latest content from
https://www.iana.org/assignments/arp-parameters/arp-parameters.xhtml

Last Updated: 2016-07-20

6 years agoAdd tests to validate ipv4->ipv6 example (#3069)
Jorge Pereira [Thu, 24 Oct 2019 18:22:34 +0000 (15:22 -0300)] 
Add tests to validate ipv4->ipv6 example (#3069)

6 years agoAdditional clarifications
Arran Cudbard-Bell [Thu, 24 Oct 2019 12:25:32 +0000 (08:25 -0400)] 
Additional clarifications

6 years agofix fr_radius_attr_len() to return correct values
Alan T. DeKok [Thu, 24 Oct 2019 13:59:17 +0000 (09:59 -0400)] 
fix fr_radius_attr_len() to return correct values

for fixed-size octet fields