]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
update for RFC 7291
authorAlan T. DeKok <aland@freeradius.org>
Mon, 21 Mar 2022 16:07:30 +0000 (12:07 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 21 Mar 2022 16:07:30 +0000 (12:07 -0400)
yet another weird format

share/dictionary/dhcpv4/dictionary
share/dictionary/dhcpv4/dictionary.rfc2131
share/dictionary/dhcpv4/dictionary.rfc7291 [new file with mode: 0644]
src/tests/unit/protocols/dhcpv4/rfc7291.txt [new file with mode: 0644]

index e1875bb35f02085bec6f15e52b74b37057b0baf5..494370a5d4d5adea9a38e31494be52bf4928b9f5 100644 (file)
@@ -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
index 97aea872b0e88ce2f21cd72457a03d1faf4f7602..a3a7e0f89a46ef6c15d49922be1fba0bbc7bbda2 100644 (file)
@@ -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 (file)
index 0000000..28ff7dc
--- /dev/null
@@ -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 (file)
index 0000000..459c906
--- /dev/null
@@ -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