Add test for multiprotocol announce statements
authorclaudio <claudio@openbsd.org>
Wed, 12 Apr 2023 09:09:41 +0000 (09:09 +0000)
committerclaudio <claudio@openbsd.org>
Wed, 12 Apr 2023 09:09:41 +0000 (09:09 +0000)
regress/usr.sbin/bgpd/config/Makefile
regress/usr.sbin/bgpd/config/bgpd.conf.15.in [new file with mode: 0644]
regress/usr.sbin/bgpd/config/bgpd.conf.15.ok [new file with mode: 0644]

index 9519fb5..263b09f 100644 (file)
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.12 2022/11/18 10:26:04 claudio Exp $
+# $OpenBSD: Makefile,v 1.13 2023/04/12 09:09:41 claudio Exp $
 
-BGPDTESTS=1 2 3 4 5 6 7 8 9 10 11 12 13 14
+BGPDTESTS=1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
 
 .for n in ${BGPDTESTS}
 BGPD_TARGETS+=bgpd${n}
diff --git a/regress/usr.sbin/bgpd/config/bgpd.conf.15.in b/regress/usr.sbin/bgpd/config/bgpd.conf.15.in
new file mode 100644 (file)
index 0000000..2b590cf
--- /dev/null
@@ -0,0 +1,18 @@
+# $OpenBSD: bgpd.conf.15.in,v 1.1 2023/04/12 09:09:41 claudio Exp $
+# test multiprotocol announce statements
+
+AS 1
+
+neighbor 192.0.2.1 {
+       remote-as       64496
+       announce inet unicast
+       announce inet vpn
+       announce inet flowspec
+}
+
+neighbor 2001:db8::1 {
+       remote-as       64496
+       announce inet6 unicast
+       announce inet6 vpn
+       announce inet6 flowspec
+}
diff --git a/regress/usr.sbin/bgpd/config/bgpd.conf.15.ok b/regress/usr.sbin/bgpd/config/bgpd.conf.15.ok
new file mode 100644 (file)
index 0000000..f09bc9d
--- /dev/null
@@ -0,0 +1,26 @@
+AS 1
+router-id 127.0.0.1
+socket "/var/run/bgpd.sock.0"
+listen on 0.0.0.0
+listen on ::
+
+
+rde rib Adj-RIB-In no evaluate
+rde rib Loc-RIB rtable 0 fib-update yes
+
+neighbor 192.0.2.1 {
+       remote-as 64496
+       enforce neighbor-as yes
+       enforce local-as yes
+       announce IPv4 unicast
+       announce IPv4 vpn
+       announce IPv4 flowspec
+}
+neighbor 2001:db8::1 {
+       remote-as 64496
+       enforce neighbor-as yes
+       enforce local-as yes
+       announce IPv6 unicast
+       announce IPv6 vpn
+       announce IPv6 flowspec
+}