Adjust lladdr test to use templates in rdomain1 (e.g. fe80::%pair11/64)
authorclaudio <claudio@openbsd.org>
Mon, 16 Oct 2023 12:49:15 +0000 (12:49 +0000)
committerclaudio <claudio@openbsd.org>
Mon, 16 Oct 2023 12:49:15 +0000 (12:49 +0000)
The code allready supports matching of templates with a scope id and
fe80::%pair11/64 and fe80::%gif11/64 are different to session_match_mask().

regress/usr.sbin/bgpd/integrationtests/bgpd.lladdr.rdomain1.conf
regress/usr.sbin/bgpd/integrationtests/lladdr.sh

index 91d5c03..7094b7c 100644 (file)
@@ -5,19 +5,25 @@ fib-update yes
 network 2001:db8:1::/48 set community 0:1
 network 2001:db8:11::/48 set community 0:11
 
-neighbor fe80::c0fe:2%pair11 {
-       descr           "RDOMAIN2"
-       remote-as       4200000002
+group pair11 {
        local-address   fe80::c0fe:1%pair11
+
+       neighbor fe80::%pair11/64 {
+               descr           "RDOMAIN2"
+               remote-as       4200000002
+       }
 }
-neighbor fe80::beef:2%gif11 {
-       descr           "RDOMAIN2_2"
-       remote-as       4200000002
+group gif11 {
        local-address   fe80::beef:1%gif11
+
+       neighbor fe80::%gif11/64 {
+               descr           "RDOMAIN2_2"
+               remote-as       4200000002
+       }
 }
 
 
 allow from any
 deny to any
-allow to fe80::c0fe:2%pair11 community 0:1
-allow to fe80::beef:2%gif11 community 0:11
+allow to group pair11 community 0:1
+allow to group gif11 community 0:11
index f91eb99..0391c52 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/ksh
-#      $OpenBSD: lladdr.sh,v 1.1 2023/10/16 10:26:51 claudio Exp $
+#      $OpenBSD: lladdr.sh,v 1.2 2023/10/16 12:49:15 claudio Exp $
 
 set -e
 
@@ -86,8 +86,8 @@ route -T ${RDOMAIN2} exec ${BGPD} \
 
 sleep 1
 
-route -T11 exec bgpctl nei RDOMAIN2 up
-route -T11 exec bgpctl nei RDOMAIN2_2 up
+route -T12 exec bgpctl nei RDOMAIN1 up
+route -T12 exec bgpctl nei RDOMAIN1_2 up
 
 sleep 2