From: Alan T. DeKok Date: Mon, 21 Mar 2022 16:07:30 +0000 (-0400) Subject: update for RFC 7291 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb036e099675b83ffb26fb47c87f8ae9904deb06;p=thirdparty%2Ffreeradius-server.git update for RFC 7291 yet another weird format --- diff --git a/share/dictionary/dhcpv4/dictionary b/share/dictionary/dhcpv4/dictionary index e1875bb35f0..494370a5d4d 100644 --- a/share/dictionary/dhcpv4/dictionary +++ b/share/dictionary/dhcpv4/dictionary @@ -43,6 +43,7 @@ $INCLUDE dictionary.rfc6011 $INCLUDE dictionary.rfc6153 $INCLUDE dictionary.rfc6656 $INCLUDE dictionary.rfc6926 +$INCLUDE dictionary.rfc7291 $INCLUDE dictionary.rfc8925 $INCLUDE dictionary.adsl_forum diff --git a/share/dictionary/dhcpv4/dictionary.rfc2131 b/share/dictionary/dhcpv4/dictionary.rfc2131 index 97aea872b0e..a3a7e0f89a4 100644 --- a/share/dictionary/dhcpv4/dictionary.rfc2131 +++ b/share/dictionary/dhcpv4/dictionary.rfc2131 @@ -227,9 +227,6 @@ ATTRIBUTE V-I-Vendor-Specific 125 vsa ATTRIBUTE TFTP-Server-IPv4-Address 150 ipaddr array -# RFC draft-ietf-pcp-13 -ATTRIBUTE PCP-IPv4-Server-Address 158 octets # Complex format (not just ipaddr array) - # RFC 3942 - 159-174 - Unassigned # RFC 3942 - 178-207 - Unassigned # RFC 3942 - 214-219 - Unassigned diff --git a/share/dictionary/dhcpv4/dictionary.rfc7291 b/share/dictionary/dhcpv4/dictionary.rfc7291 new file mode 100644 index 00000000000..28ff7dc51b9 --- /dev/null +++ b/share/dictionary/dhcpv4/dictionary.rfc7291 @@ -0,0 +1,16 @@ +# -*- text -*- +# Copyright (C) 2022 The FreeRADIUS Server project and contributors +# This work is licensed under CC-BY version 4.0 https://creativecommons.org/licenses/by/4.0 +# Version $Id$ +############################################################################## +# +# RFC7291 - DHCP Options for the Port Control Protocol +# +# $Id$ +# +############################################################################## + + +ATTRIBUTE PCP-IPv4-Server-Addresses 158 struct +MEMBER server struct length=uint8,array +MEMBER ip-address ipv4addr array diff --git a/src/tests/unit/protocols/dhcpv4/rfc7291.txt b/src/tests/unit/protocols/dhcpv4/rfc7291.txt new file mode 100644 index 00000000000..459c90684b2 --- /dev/null +++ b/src/tests/unit/protocols/dhcpv4/rfc7291.txt @@ -0,0 +1,26 @@ +proto dhcpv4 +proto-dictionary dhcpv4 +fuzzer-out dhcpv4 + +decode-pair 9e 05 04 7f 00 00 01 +match PCP-IPv4-Server-Addresses = { server = { ip-address = 127.0.0.1 } } + +encode-pair - +match 9e 05 04 7f 00 00 01 + +# multiple in one struct +encode-pair PCP-IPv4-Server-Addresses = { server = { ip-address = 127.0.0.1, ip-address = 127.0.0.2 } } +match 9e 09 08 7f 00 00 01 7f 00 00 02 + +decode-pair - +match PCP-IPv4-Server-Addresses = { server = { ip-address = 127.0.0.1, ip-address = 127.0.0.2 } } + +# multiple structs +encode-pair PCP-IPv4-Server-Addresses = { server = { ip-address = 127.0.0.1, ip-address = 127.0.0.2 }, server = { ip-address = 192.168.0.1, ip-address = 192.168.0.2 } } +match 9e 12 08 7f 00 00 01 7f 00 00 02 08 c0 a8 00 01 c0 a8 00 02 + +decode-pair - +match PCP-IPv4-Server-Addresses = { server = { ip-address = 127.0.0.1, ip-address = 127.0.0.2 }, server = { ip-address = 192.168.0.1, ip-address = 192.168.0.2 } } + +count +match 15