]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add simple test of Relay-Forward
authorNick Porter <nick@portercomputing.co.uk>
Mon, 17 Nov 2025 14:59:56 +0000 (14:59 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Mon, 17 Nov 2025 17:00:56 +0000 (17:00 +0000)
src/tests/process/dhcpv6/Relay-Forward [new file with mode: 0644]
src/tests/process/dhcpv6/server.conf

diff --git a/src/tests/process/dhcpv6/Relay-Forward b/src/tests/process/dhcpv6/Relay-Forward
new file mode 100644 (file)
index 0000000..10e40db
--- /dev/null
@@ -0,0 +1,60 @@
+subrequest @DHCPv6::Relay-Forward {
+       Hop-Count = 0
+       Relay-Link-Address = 2001:cafe::2
+       Relay-Peer-Address = 2001:cafe::3
+       Relay-Message = {
+               Packet-Type = ::Solicit
+               Transaction-ID = 0x1835ef
+               Client-ID = {
+                       DUID = ::UUID
+                       DUID.UUID = {
+                               Value = 0x00000000000000000000000000000001
+                       }
+               }
+               IA-NA = {
+                       IAID = 4278191680
+                       T1 = 0
+                       T2 = 0
+               }
+               Option-Request = DNS-Servers
+               Option-Request = Domain-List
+               Option-Request = SNTP-Servers
+               Option-Request = Client-FQDN
+               Option-Request = SOL-Max-RT
+               Option-Request = INF-Max-RT
+               Elapsed-Time = 0
+               Rapid-Commit = yes
+               Client-FQDN = {
+                       Reserved = 0
+                       No-Server-Update = no
+                       Server-Override = no
+                       Server-Update = yes
+                       Domain-Name = "rei"
+               }
+       }
+       Client-Link-Layer = {
+               Type = ::Ethernet
+               Type.Ethernet = {
+                       Address = 0xaabbccddeeff
+               }
+       }
+       Interface-ID = 'eth0'
+       Relay-Agent-Remote-ID = {
+               Vendor = 9
+               Value = 0x01020304
+       }
+
+       call dhcpv6 {
+               # 'Relay-Forward' expects 'Relay-Reply'
+               if (reply.Packet-Type != ::Relay-Reply) {
+                       test_fail
+               }
+
+#
+#  Disabled at present pending UNION data types
+#
+#              if (!reply.Server-ID.DUID.UUID.Value) {
+#                      test_fail
+#              }
+       }
+}
index 7943007f1300a00b309cc442ba1b350400f8f059..57776af9a62d3c44fd2cd400da1e6e6a4e651bac 100644 (file)
@@ -86,4 +86,20 @@ server dhcpv6 {
                        AFTR-Name = "tapioca.net"
                }
        }
+
+       recv Relay-Forward {
+               ok
+       }
+
+       send Relay-Reply {
+               reply += {
+                       Server-ID = {
+                               DUID = ::UUID
+                               DUID.UUID = {
+                                       Value = 0x00000000000000000000000000000000
+                               }
+                       }
+               }
+               ok
+       }
 }