]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
manual pull of PR #4440
authorAlan T. DeKok <aland@freeradius.org>
Thu, 24 Mar 2022 20:30:30 +0000 (16:30 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 24 Mar 2022 20:34:44 +0000 (16:34 -0400)
share/dictionary/dhcpv4/dictionary
share/dictionary/dhcpv4/dictionary.rfc2131
share/dictionary/dhcpv4/dictionary.rfc4702 [new file with mode: 0644]
src/tests/unit/protocols/dhcpv4/rfc4702.txt [new file with mode: 0644]

index d6b112f454aa1d86c06841a89c071f11fa61502f..6e22077f2ea9ee661b578e2a68adc2e730190934 100644 (file)
@@ -31,6 +31,7 @@ $INCLUDE dictionary.rfc3397
 $INCLUDE dictionary.rfc3442
 $INCLUDE dictionary.rfc4280
 $INCLUDE dictionary.rfc4578
+$INCLUDE dictionary.rfc4702
 $INCLUDE dictionary.rfc4776
 $INCLUDE dictionary.rfc4833
 $INCLUDE dictionary.rfc5071
index 94839a6cb8d5ef72be8ba8261291a493fc9bcdd5..4ad5edb3e6c692e2bd80cd2e4f0d0741fdeb7990 100644 (file)
@@ -140,8 +140,7 @@ ATTRIBUTE   STDA-Server-Address                     76      ipaddr array
 
 # Rapid Commit
 ATTRIBUTE      Rapid-Commit                            80      bool            encode=exists
-# Fully Qualified Domain Name
-ATTRIBUTE      Client-FQDN                             81      string
+
 # Relay Agent Information
 ATTRIBUTE      Relay-Agent-Information                 82      tlv
 
diff --git a/share/dictionary/dhcpv4/dictionary.rfc4702 b/share/dictionary/dhcpv4/dictionary.rfc4702
new file mode 100644 (file)
index 0000000..5a534ac
--- /dev/null
@@ -0,0 +1,35 @@
+# -*- 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$
+##############################################################################
+#
+#  RFC4702 - The Dynamic Host Configuration Protocol (DHCP) Client
+#            Fully Qualified Domain Name (FQDN) Option
+#
+#  $Id$
+#
+##############################################################################
+
+#
+# RFC 4702 describes the Flags field, here the first four members of
+# Client-FQDN, as follows:
+#
+#   The format of the 1-octet Flags field is:
+#
+#        0 1 2 3 4 5 6 7
+#       +-+-+-+-+-+-+-+-+
+#       |  MBZ  |N|E|O|S|
+#       +-+-+-+-+-+-+-+-+
+#
+
+# Fully Qualified Domain Name
+ATTRIBUTE      Client-FQDN                             81      struct
+MEMBER         mbz                                     bit[4]
+MEMBER         no_dns_updates                          bit[1]
+MEMBER         new_dns_encoding                        bit[1]
+MEMBER         override                                bit[1]
+MEMBER         should_do_dns_updates                   bit[1]
+MEMBER         RCODE1                                  uint8
+MEMBER         RCODE2                                  uint8
+MEMBER         Domain-Name                             string dns_label
diff --git a/src/tests/unit/protocols/dhcpv4/rfc4702.txt b/src/tests/unit/protocols/dhcpv4/rfc4702.txt
new file mode 100644 (file)
index 0000000..120f16c
--- /dev/null
@@ -0,0 +1,12 @@
+proto dhcpv4
+proto-dictionary dhcpv4
+fuzzer-out dhcpv4
+
+encode-pair Client-FQDN = { mbz = 0, no_dns_updates = yes, new_dns_encoding = yes, override = no, should_do_dns_updates = no, RCODE1 = 0, RCODE2 = 0, Domain-Name = "example.co.uk" }
+match 51 12 0c 00 00 07 65 78 61 6d 70 6c 65 02 63 6f 02 75 6b 00
+
+decode-pair -
+match Client-FQDN = { mbz = 0, no_dns_updates = yes, new_dns_encoding = yes, override = no, should_do_dns_updates = no, RCODE1 = 0, RCODE2 = 0, Domain-Name = "example.co.uk" }
+
+count
+match 7