]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
5 years agoadded test for malformed attributes
Alan T. DeKok [Thu, 8 Oct 2020 19:55:25 +0000 (15:55 -0400)] 
added test for malformed attributes

5 years agomalformed VSAs get decoded as raw attributes
Alan T. DeKok [Thu, 8 Oct 2020 19:54:30 +0000 (15:54 -0400)] 
malformed VSAs get decoded as raw attributes

5 years agoaccount for 4 bytes of PEN and 1 byte of length, too
Alan T. DeKok [Thu, 8 Oct 2020 19:52:32 +0000 (15:52 -0400)] 
account for 4 bytes of PEN and 1 byte of length, too

5 years agoASAN poison regions of the buffer which we're not using.
Alan T. DeKok [Thu, 8 Oct 2020 19:47:47 +0000 (15:47 -0400)] 
ASAN poison regions of the buffer which we're not using.

5 years agoFix bad search/replace
Arran Cudbard-Bell [Thu, 8 Oct 2020 18:55:33 +0000 (13:55 -0500)] 
Fix bad search/replace

5 years agoAdd src/dst address swap function
Arran Cudbard-Bell [Thu, 8 Oct 2020 18:54:13 +0000 (13:54 -0500)] 
Add src/dst address swap function

5 years agoUnify socket address structures
Arran Cudbard-Bell [Thu, 8 Oct 2020 18:44:58 +0000 (13:44 -0500)] 
Unify socket address structures

5 years agoRestore amount to advance by to fr_dbuff_marker_advance() (#3682)
James Jones [Thu, 8 Oct 2020 15:45:21 +0000 (10:45 -0500)] 
Restore amount to advance by to fr_dbuff_marker_advance() (#3682)

5 years agoConvert selected "dbuff" operations to macros that take dbuff or marker (#3674)
James Jones [Thu, 8 Oct 2020 15:04:53 +0000 (10:04 -0500)] 
Convert selected "dbuff" operations to macros that take dbuff or marker (#3674)

Aside from fr_dbuff_current(), which will use the marker's current
position pointer when passed a marker, these will, when passed a
marker, retrieve the value from its associated dbuff.

We leave the current marker functions in place so code using them
can change at will rather than forcing a flag day.

Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
5 years agoAdd fr_dbuff_move() and tests (#3675)
James Jones [Thu, 8 Oct 2020 14:57:45 +0000 (09:57 -0500)] 
Add fr_dbuff_move() and tests (#3675)

5 years agouse correct API to get 'octets' data type
Alan T. DeKok [Thu, 8 Oct 2020 14:24:43 +0000 (10:24 -0400)] 
use correct API to get 'octets' data type

5 years agomalformed options are decoded as raw options, and don't return an error
Alan T. DeKok [Thu, 8 Oct 2020 13:17:03 +0000 (09:17 -0400)] 
malformed options are decoded as raw options, and don't return an error

5 years agos/request->state/request->state_pairs/
Arran Cudbard-Bell [Wed, 7 Oct 2020 19:30:51 +0000 (14:30 -0500)] 
s/request->state/request->state_pairs/

5 years agos/request->packet->vps/request->request_pairs/
Arran Cudbard-Bell [Wed, 7 Oct 2020 19:29:38 +0000 (14:29 -0500)] 
s/request->packet->vps/request->request_pairs/

5 years agos/request->reply->vps/request->reply_list/g
Arran Cudbard-Bell [Wed, 7 Oct 2020 19:14:47 +0000 (14:14 -0500)] 
s/request->reply->vps/request->reply_list/g

5 years agos/request->control/request->control_pairs/g
Arran Cudbard-Bell [Wed, 7 Oct 2020 19:11:34 +0000 (14:11 -0500)] 
s/request->control/request->control_pairs/g

5 years agoAdd macros for pair lists
Arran Cudbard-Bell [Wed, 7 Oct 2020 18:58:42 +0000 (13:58 -0500)] 
Add macros for pair lists

5 years agoallow attribute references in subrequest
Alan T. DeKok [Wed, 7 Oct 2020 17:52:47 +0000 (13:52 -0400)] 
allow attribute references in subrequest

and update docs and tests

5 years agoregenerate from config
Alan T. DeKok [Wed, 7 Oct 2020 17:48:45 +0000 (13:48 -0400)] 
regenerate from config

5 years agocheck for overflow on each PEN + len + options
Alan T. DeKok [Wed, 7 Oct 2020 13:51:00 +0000 (09:51 -0400)] 
check for overflow on each PEN + len + options

5 years agodecode ipv4addr as ipv4addr, not as ipv4prefix
Alan T. DeKok [Wed, 7 Oct 2020 13:43:15 +0000 (09:43 -0400)] 
decode ipv4addr as ipv4addr, not as ipv4prefix

5 years agorename to DHCP-Network-Subnet
Alan T. DeKok [Wed, 7 Oct 2020 13:36:51 +0000 (09:36 -0400)] 
rename to DHCP-Network-Subnet

if it's data type "ipv4prefix", then the name should NOT be
DHCP-Network-IP-Address

5 years agoRemove useless copy operation
Arran Cudbard-Bell [Wed, 7 Oct 2020 13:30:22 +0000 (08:30 -0500)] 
Remove useless copy operation

5 years agoRemove useless code in fr_dhcpv4_decode_proto
Arran Cudbard-Bell [Wed, 7 Oct 2020 13:23:13 +0000 (08:23 -0500)] 
Remove useless code in fr_dhcpv4_decode_proto

5 years ago:gear: dhcpv4: Fix wrong memory context
Jorge Pereira [Wed, 7 Oct 2020 01:26:18 +0000 (22:26 -0300)] 
:gear: dhcpv4: Fix wrong memory context

It must be the received ctx instead of local allocation.

5 years ago:gear: dhcpv4: Fix the data type value box
Jorge Pereira [Wed, 7 Oct 2020 01:25:18 +0000 (22:25 -0300)] 
:gear: dhcpv4: Fix the data type value box

5 years agoIgnore fuzzer crash files
Jorge Pereira [Wed, 7 Oct 2020 02:40:27 +0000 (23:40 -0300)] 
Ignore fuzzer crash files

5 years agostatically define Tacacs-State
Alan T. DeKok [Tue, 6 Oct 2020 13:43:52 +0000 (09:43 -0400)] 
statically define Tacacs-State

5 years agoFix UBSAN in fr_value_box_cast()
Jorge Pereira [Tue, 6 Oct 2020 04:43:28 +0000 (01:43 -0300)] 
Fix UBSAN in fr_value_box_cast()

5 years agomove run-time checks to compile-time checks
Alan T. DeKok [Mon, 5 Oct 2020 21:42:46 +0000 (17:42 -0400)] 
move run-time checks to compile-time checks

5 years agoreturn on error
Alan T. DeKok [Mon, 5 Oct 2020 21:18:29 +0000 (17:18 -0400)] 
return on error

5 years agoinitialize the VPs list
Alan T. DeKok [Mon, 5 Oct 2020 21:16:29 +0000 (17:16 -0400)] 
initialize the VPs list

5 years agomore tests for multiple VSAs
Alan T. DeKok [Mon, 5 Oct 2020 18:06:37 +0000 (14:06 -0400)] 
more tests for multiple VSAs

5 years agotypo
Alan T. DeKok [Mon, 5 Oct 2020 18:04:59 +0000 (14:04 -0400)] 
typo

5 years agoadd more vendors, and reformat
Alan T. DeKok [Mon, 5 Oct 2020 17:54:16 +0000 (13:54 -0400)] 
add more vendors, and reformat

5 years agoencode multiple VSAs into option 25
Alan T. DeKok [Mon, 5 Oct 2020 17:29:16 +0000 (13:29 -0400)] 
encode multiple VSAs into option 25

5 years agoremove unnecessary comment
Alan T. DeKok [Mon, 5 Oct 2020 17:09:34 +0000 (13:09 -0400)] 
remove unnecessary comment

5 years agoadd tests. and decode multiple VSAs in option 125
Alan T. DeKok [Mon, 5 Oct 2020 17:06:06 +0000 (13:06 -0400)] 
add tests. and decode multiple VSAs in option 125

5 years agoskip all of the VSA, even if we didn't read it all
Alan T. DeKok [Mon, 5 Oct 2020 17:02:59 +0000 (13:02 -0400)] 
skip all of the VSA, even if we didn't read it all

5 years agoAllow vendor-specific options in DHCPv4
Alan T. DeKok [Mon, 5 Oct 2020 15:40:25 +0000 (11:40 -0400)] 
Allow vendor-specific options in DHCPv4

5 years agomake error message more descriptive
Alan T. DeKok [Mon, 5 Oct 2020 15:02:50 +0000 (11:02 -0400)] 
make error message more descriptive

5 years ago'Attr-' is supported
Alan T. DeKok [Mon, 5 Oct 2020 12:56:28 +0000 (08:56 -0400)] 
'Attr-' is supported

5 years agoremove duplicate "inner-tunnel" virtual server
Alan T. DeKok [Mon, 5 Oct 2020 00:19:38 +0000 (20:19 -0400)] 
remove duplicate "inner-tunnel" virtual server

the methods which need it should provide it.  The methods which
don't need it shouldn't miss it.

5 years agooutput goes to log file, not %.ok
Alan T. DeKok [Mon, 5 Oct 2020 00:19:22 +0000 (20:19 -0400)] 
output goes to log file, not %.ok

5 years agoescape _our_ use of {}
Alan T. DeKok [Sun, 4 Oct 2020 21:39:14 +0000 (17:39 -0400)] 
escape _our_ use of {}

5 years agoadd fr_dhcpv6_reply_initialize()
Alan T. DeKok [Sun, 4 Oct 2020 21:29:34 +0000 (17:29 -0400)] 
add fr_dhcpv6_reply_initialize()

which recurses to create the nested structs / groups necessary
for nested replies.  This way we always know that the nested
packets in the request contain nested replies.

5 years agocount the number of tests, too
Alan T. DeKok [Sun, 4 Oct 2020 21:28:55 +0000 (17:28 -0400)] 
count the number of tests, too

5 years agoremove unused variable
Alan T. DeKok [Sun, 4 Oct 2020 20:48:27 +0000 (16:48 -0400)] 
remove unused variable

5 years agoquiet scanner
Alan T. DeKok [Sun, 4 Oct 2020 20:24:20 +0000 (16:24 -0400)] 
quiet scanner

5 years agodon't check if values are valid attribute names
Alan T. DeKok [Sun, 4 Oct 2020 20:21:53 +0000 (16:21 -0400)] 
don't check if values are valid attribute names

The VALUE parser in the dictionaries just strdup's the name.
So we shouldn't have more stringent checks here.

Embedded zeros, etc. should be taken care of by passing an
explicit length to fr_dict_enum_by_name()

5 years agoit helps to advance the buffer
Alan T. DeKok [Sun, 4 Oct 2020 16:25:51 +0000 (12:25 -0400)] 
it helps to advance the buffer

the tests still fail because of issues with fr_value_box_from_str()
noted in the previous commit.

5 years agostart of encoding Relay-Message
Alan T. DeKok [Sun, 4 Oct 2020 14:54:38 +0000 (10:54 -0400)] 
start of encoding Relay-Message

The tests for encoding relay packets don't yet work, for a few
reasons.

* fr_value_box_from_str() is passed dst_enumv, and it then
  checks if the value is a valid _attribute_ name?  Which
  doesn't work for IPv6 addresses, as they contain ":"
* the fr_pair_list_afrom_substr() function doesn't treat
  "Attr-" as special, so it tries to look it up in the various
  dictionaries, and fails.
* the fr_dhcpv6_encode() function is failing for nested packets,
  and doesn't return a useful error message

5 years agocheck for end _before_ dereferencing pointers
Alan T. DeKok [Sun, 4 Oct 2020 14:46:33 +0000 (10:46 -0400)] 
check for end _before_ dereferencing pointers

5 years agoset a descriptive error if the packet is not OK
Alan T. DeKok [Sun, 4 Oct 2020 14:29:27 +0000 (10:29 -0400)] 
set a descriptive error if the packet is not OK

5 years agoparse nested groups
Alan T. DeKok [Sun, 4 Oct 2020 14:11:39 +0000 (10:11 -0400)] 
parse nested groups

5 years agoremove erroneous assert
Alan T. DeKok [Sun, 4 Oct 2020 00:41:23 +0000 (20:41 -0400)] 
remove erroneous assert

now that we have duplicate detection, the assert is not needed

5 years agoget16 already looked at an offset of p + 2. It's less confusing to use two macros
Arran Cudbard-Bell [Sat, 3 Oct 2020 16:48:21 +0000 (11:48 -0500)] 
get16 already looked at an offset of p + 2.  It's less confusing to use two macros

5 years agodon't run packet_expiry_timer twice
Alan T. DeKok [Sat, 3 Oct 2020 15:52:39 +0000 (11:52 -0400)] 
don't run packet_expiry_timer twice

5 years agodon't use "agent." prefix
Alan T. DeKok [Sat, 3 Oct 2020 15:39:04 +0000 (11:39 -0400)] 
don't use "agent." prefix

now that we have full OIDs for names

5 years agorelay packets may be nested to almost any depth
Alan T. DeKok [Sat, 3 Oct 2020 15:37:30 +0000 (11:37 -0400)] 
relay packets may be nested to almost any depth

5 years agoEnglishify
Arran Cudbard-Bell [Sat, 3 Oct 2020 14:55:50 +0000 (09:55 -0500)] 
Englishify

5 years agoRemove two uses of tmpl_preparse
Arran Cudbard-Bell [Sat, 3 Oct 2020 14:33:12 +0000 (09:33 -0500)] 
Remove two uses of tmpl_preparse

5 years agoMinor tweaks
Arran Cudbard-Bell [Fri, 2 Oct 2020 20:49:03 +0000 (15:49 -0500)] 
Minor tweaks

5 years agoremove unused assignment
Alan T. DeKok [Sat, 3 Oct 2020 12:49:41 +0000 (08:49 -0400)] 
remove unused assignment

5 years agoforbid smashing flags.
Alan T. DeKok [Sat, 3 Oct 2020 12:30:30 +0000 (08:30 -0400)] 
forbid smashing flags.

once a flag is set, it shouldn't be overwritten

5 years agoremove FR_TYPE_EXTENDED
Alan T. DeKok [Sat, 3 Oct 2020 01:23:02 +0000 (21:23 -0400)] 
remove FR_TYPE_EXTENDED

it's now just a TLV with magic flags, and only for RADIUS

5 years agoremove FR_TYPE_EXTENDED from the RADIUS dictionaries and code
Alan T. DeKok [Sat, 3 Oct 2020 01:16:43 +0000 (21:16 -0400)] 
remove FR_TYPE_EXTENDED from the RADIUS dictionaries and code

change it instead to data type "tlv", with flag "extended"

5 years agoremove duplicate names in dictionary flags
Alan T. DeKok [Sat, 3 Oct 2020 00:47:18 +0000 (20:47 -0400)] 
remove duplicate names in dictionary flags

5 years agoclean up and recursively verify Relay-Message
Alan T. DeKok [Fri, 2 Oct 2020 20:19:51 +0000 (16:19 -0400)] 
clean up and recursively verify Relay-Message

fix fr_dhcpv6_option_find() to check lengths
and verify to/from client now checks inside of Relay-Message
for the various packet requirements

5 years agoUnknown parents shouldn't have any children
Arran Cudbard-Bell [Fri, 2 Oct 2020 20:16:14 +0000 (15:16 -0500)] 
Unknown parents shouldn't have any children

5 years agoonly one error per unit test
Alan T. DeKok [Fri, 2 Oct 2020 20:01:09 +0000 (16:01 -0400)] 
only one error per unit test

5 years agoBetter errors
Arran Cudbard-Bell [Fri, 2 Oct 2020 19:47:04 +0000 (14:47 -0500)] 
Better errors

5 years agoFixup tests for non vendor definitions
Arran Cudbard-Bell [Fri, 2 Oct 2020 19:45:25 +0000 (14:45 -0500)] 
Fixup tests for non vendor definitions

5 years agoTypo
Arran Cudbard-Bell [Fri, 2 Oct 2020 19:28:04 +0000 (14:28 -0500)] 
Typo

5 years agoAdd Nokia SR DHCPv6 options
Arran Cudbard-Bell [Fri, 2 Oct 2020 19:26:29 +0000 (14:26 -0500)] 
Add Nokia SR DHCPv6 options

5 years ago<sigh>
Alan T. DeKok [Fri, 2 Oct 2020 18:52:07 +0000 (14:52 -0400)] 
<sigh>

5 years agoskip option header, too
Alan T. DeKok [Fri, 2 Oct 2020 18:49:50 +0000 (14:49 -0400)] 
skip option header, too

5 years agodecode relay options, not relay header
Alan T. DeKok [Fri, 2 Oct 2020 18:48:09 +0000 (14:48 -0400)] 
decode relay options, not relay header

5 years agofix the tests for new decoder and updated dictionaries
Alan T. DeKok [Fri, 2 Oct 2020 18:43:28 +0000 (14:43 -0400)] 
fix the tests for new decoder and updated dictionaries

5 years agoclarify error
Alan T. DeKok [Fri, 2 Oct 2020 18:23:22 +0000 (14:23 -0400)] 
clarify error

5 years agodecode it as a struct
Alan T. DeKok [Fri, 2 Oct 2020 18:19:46 +0000 (14:19 -0400)] 
decode it as a struct

5 years agoParent unknowns correctly
Arran Cudbard-Bell [Fri, 2 Oct 2020 18:25:21 +0000 (13:25 -0500)] 
Parent unknowns correctly

5 years agomark attributes as type 'group'
Alan T. DeKok [Fri, 2 Oct 2020 18:10:31 +0000 (14:10 -0400)] 
mark attributes as type 'group'

5 years agoinsert the relay-message into the output list
Arran Cudbard-Bell [Fri, 2 Oct 2020 18:08:01 +0000 (13:08 -0500)] 
insert the relay-message into the output list

5 years agoPrint the child name when decoding structs
Arran Cudbard-Bell [Fri, 2 Oct 2020 18:05:44 +0000 (13:05 -0500)] 
Print the child name when decoding structs

5 years agopass the correct length to value_box_from_network
Alan T. DeKok [Fri, 2 Oct 2020 17:59:04 +0000 (13:59 -0400)] 
pass the correct length to value_box_from_network

5 years agoAdd failing test for relayed packets
Arran Cudbard-Bell [Fri, 2 Oct 2020 17:49:41 +0000 (12:49 -0500)] 
Add failing test for relayed packets

5 years agoExpose loaded attributes to encoder/decoder
Arran Cudbard-Bell [Fri, 2 Oct 2020 17:49:27 +0000 (12:49 -0500)] 
Expose loaded attributes to encoder/decoder

5 years agoDecode relay message options
Arran Cudbard-Bell [Fri, 2 Oct 2020 17:49:11 +0000 (12:49 -0500)] 
Decode relay message options

5 years agotypos.
Alan T. DeKok [Fri, 2 Oct 2020 17:52:50 +0000 (13:52 -0400)] 
typos.

slower is faster :(

5 years agofix return code from fr_dhcpv6_ok_internal()
Alan T. DeKok [Fri, 2 Oct 2020 17:49:42 +0000 (13:49 -0400)] 
fix return code from fr_dhcpv6_ok_internal()

5 years agocheck max_attributes for nested Relay-Messages
Alan T. DeKok [Fri, 2 Oct 2020 17:39:07 +0000 (13:39 -0400)] 
check max_attributes for nested Relay-Messages

5 years agoRFC 8415 Section 19.3 allows for nested Relay-Messages
Alan T. DeKok [Fri, 2 Oct 2020 17:31:35 +0000 (13:31 -0400)] 
RFC 8415 Section 19.3 allows for nested Relay-Messages

5 years agodon't allow Relay-Message in normal packets
Alan T. DeKok [Fri, 2 Oct 2020 17:24:50 +0000 (13:24 -0400)] 
don't allow Relay-Message in normal packets

5 years agorecurse to check contents of Relay-Message
Alan T. DeKok [Fri, 2 Oct 2020 16:40:09 +0000 (12:40 -0400)] 
recurse to check contents of Relay-Message

5 years agoforbid duplicate virtual servers
Alan T. DeKok [Fri, 2 Oct 2020 16:18:57 +0000 (12:18 -0400)] 
forbid duplicate virtual servers

5 years agofix fr_dhcpv6_ok() for relay message
Alan T. DeKok [Fri, 2 Oct 2020 15:54:37 +0000 (11:54 -0400)] 
fix fr_dhcpv6_ok() for relay message

5 years agoadd cleanup_delay to dhcpv4, dhcpv6, and ensure it's >0
Alan T. DeKok [Fri, 2 Oct 2020 15:46:16 +0000 (11:46 -0400)] 
add cleanup_delay to dhcpv4, dhcpv6, and ensure it's >0

5 years agoPass up the failure if onload fails
Arran Cudbard-Bell [Fri, 2 Oct 2020 15:39:33 +0000 (10:39 -0500)] 
Pass up the failure if onload fails

5 years agoFix relay message type
Arran Cudbard-Bell [Fri, 2 Oct 2020 15:38:04 +0000 (10:38 -0500)] 
Fix relay message type