]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add foreign tests to DHCPv6
authorAlan T. DeKok <aland@freeradius.org>
Sun, 4 Feb 2024 15:24:09 +0000 (10:24 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 4 Feb 2024 15:24:09 +0000 (10:24 -0500)
share/dictionary/dhcpv6/dictionary.rfc7037
src/tests/unit/protocols/dhcpv6/bools.txt
src/tests/unit/protocols/dhcpv6/foreign.txt [new file with mode: 0644]

index 27437c8f5e5fb3226da0b82e4a146d6e03e9b5f6..9f5d435c2f040e3404b3b3eee2db3a7b1b5ffac9 100644 (file)
@@ -10,4 +10,4 @@
 #
 ##############################################################################
 
-ATTRIBUTE      RADIUS                                  81      octets # group ref=..RADIUS
+ATTRIBUTE      RADIUS                                  81      group ref=..RADIUS
index 75143db39f233aa56a89cfafe31f3c14d071dfeb..b60f9174811f76746710f4fc5dfc842792aed21b 100644 (file)
@@ -9,9 +9,6 @@ proto dhcpv6
 proto-dictionary dhcpv6
 fuzzer-out dhcpv6
 
-#decode-pair 005100085a04030019fc0000005100087f040300190301c5
-#match raw.RADIUS = 0x5a04030019fc0000, raw.RADIUS = 0x7f040300190301c5
-
 #
 #  True values are encoded by using an empty attribute.
 #
diff --git a/src/tests/unit/protocols/dhcpv6/foreign.txt b/src/tests/unit/protocols/dhcpv6/foreign.txt
new file mode 100644 (file)
index 0000000..d571b2a
--- /dev/null
@@ -0,0 +1,22 @@
+#  -*- text -*-
+#  Copyright (C) 2019 Network RADIUS SARL (legal@networkradius.com)
+#  This work is licensed under CC-BY version 4.0 https://creativecommons.org/licenses/by/4.0
+#
+#  Version $Id$
+#
+
+proto dhcpv6
+proto-dictionary dhcpv6
+fuzzer-out dhcpv6
+
+decode-pair 005100085a04030019fc0000005100087f040300190301c5
+match raw.RADIUS = 0x5a04030019fc0000, raw.RADIUS = 0x7f040300190301c5
+
+encode-pair RADIUS = { User-Name = "bob" }
+match 00 51 00 05 01 05 62 6f 62
+
+decode-pair -
+match RADIUS = { User-Name = "bob" }
+
+count
+match 9