]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Move DHCPv6/rfc3319 tests to src/tests/unit/dhcpv6_rfc3319.txt
authorJorge Pereira <jpereiran@gmail.com>
Tue, 22 Oct 2019 00:11:41 +0000 (21:11 -0300)
committerAlan DeKok <aland@freeradius.org>
Tue, 22 Oct 2019 19:39:44 +0000 (15:39 -0400)
src/tests/unit/all.mk
src/tests/unit/dhcpv6.txt
src/tests/unit/dhcpv6_rfc3319.txt [new file with mode: 0644]

index 02811dd83e7139b969944cfa278e66123cad997b..6ffd54fcbeb9af92607982cde018dc1c1ef647f9 100644 (file)
@@ -30,6 +30,7 @@ FILES  := \
        eap_sim_error.txt \
        dhcpv4.txt \
        dhcpv6.txt \
+       dhcpv6_rfc3319.txt \
        regex.txt \
        escape.txt \
        condition.txt \
index 7532f0f6b03d2af6aad313ea03e6ea14a4f76fb4..7588f808fced7f69458b8ea7308efc7cbe8d807e 100644 (file)
@@ -121,12 +121,6 @@ match 00 3d 00 04 00 00 00 16 00 6f 00 04 00 40 00 5e
 encode-pair Client-Arch-Type = x86-BIOS
 match 00 3d 00 02 00 00
 
-#
-#  Array of IPv6 addresses
-#
-encode-pair SIP-Server-Address = 2001:0db8:85a3:0000:0000:8a2e:0370:7334, SIP-Server-Address = 2001:0db8:85a3:0000:0000:8a2e:0370:7335
-match 00 16 00 20 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 35
-
 #
 #  Array of strings, each substring should have a 16bit length field containing its length
 #
@@ -173,18 +167,6 @@ match 00 36 00 28 00 01 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34 00
 encode-pair NTP-Server-Address = 2001:0db8:85a3:0000:0000:8a2e:0370:7334
 match 00 38 00 14 00 01 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34
 
-encode-pair SIP-Server-Domain-Name-List = "foo.ca"
-match 00 15 00 08 03 66 6f 6f 02 63 61 00
-
-encode-pair SIP-Server-Domain-Name-List = "foo.ca", SIP-Server-Domain-Name-List = "example.com"
-match 00 15 00 15 03 66 6f 6f 02 63 61 00 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00
-
-encode-pair SIP-Server-Domain-Name-List = "www.example.com", SIP-Server-Domain-Name-List = "ftp.example.com"
-match 00 15 00 17 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 03 66 74 70 c0 04
-
-encode-pair SIP-Server-Domain-Name-List = "www.example.com", SIP-Server-Domain-Name-List = "ftp.example.com", SIP-Server-Domain-Name-List = "ns.example.com"
-match 00 15 00 1c 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 03 66 74 70 c0 04 02 6e 73 c0 04
-
 #
 #  This attribute is NOT compressed!
 #
@@ -198,4 +180,4 @@ encode-pair BCMCS-Server-Domain-Name-List = "www.example.com", BCMCS-Server-Doma
 match 00 21 00 32 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 03 66 74 70 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 02 6e 73 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00
 
 count
-match 90
+match 80
diff --git a/src/tests/unit/dhcpv6_rfc3319.txt b/src/tests/unit/dhcpv6_rfc3319.txt
new file mode 100644 (file)
index 0000000..cf231e3
--- /dev/null
@@ -0,0 +1,34 @@
+#
+#  Test vectors for DHCPv6 attributes for (SIP) Servers
+#
+load dhcpv6
+dictionary-load dhcpv6
+
+#
+#  3.1  SIP Servers Domain Name List
+#
+
+#
+#  TLV with single values
+#
+encode-pair SIP-Server-Domain-Name-List = "foo.ca"
+match 00 15 00 08 03 66 6f 6f 02 63 61 00
+
+encode-pair SIP-Server-Domain-Name-List = "foo.ca", SIP-Server-Domain-Name-List = "example.com"
+match 00 15 00 15 03 66 6f 6f 02 63 61 00 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00
+
+encode-pair SIP-Server-Domain-Name-List = "www.example.com", SIP-Server-Domain-Name-List = "ftp.example.com"
+match 00 15 00 17 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 03 66 74 70 c0 04
+
+encode-pair SIP-Server-Domain-Name-List = "www.example.com", SIP-Server-Domain-Name-List = "ftp.example.com", SIP-Server-Domain-Name-List = "ns.example.com"
+match 00 15 00 1c 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 03 66 74 70 c0 04 02 6e 73 c0 04
+
+#
+#  3.2 SIP Servers IPv6 Address List
+#
+
+#
+#  Array of IPv6 addresses
+#
+encode-pair SIP-Server-Address = 2001:0db8:85a3:0000:0000:8a2e:0370:7334, SIP-Server-Address = 2001:0db8:85a3:0000:0000:8a2e:0370:7335
+match 00 16 00 20 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 35