add a test for network statements with prefix-sets
authorbenno <benno@openbsd.org>
Mon, 10 Sep 2018 14:20:25 +0000 (14:20 +0000)
committerbenno <benno@openbsd.org>
Mon, 10 Sep 2018 14:20:25 +0000 (14:20 +0000)
regress/usr.sbin/bgpd/config/Makefile
regress/usr.sbin/bgpd/config/bgpd.conf.8.in [new file with mode: 0644]
regress/usr.sbin/bgpd/config/bgpd.conf.8.ok [new file with mode: 0644]

index 3d57b5a..03568c3 100644 (file)
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.4 2018/09/08 13:10:55 claudio Exp $
+# $OpenBSD: Makefile,v 1.5 2018/09/10 14:20:25 benno Exp $
 
-BGPDTESTS=1 2 3 4 5 6 7
+BGPDTESTS=1 2 3 4 5 6 7 8
 
 REGRESS_TARGETS = config
 
diff --git a/regress/usr.sbin/bgpd/config/bgpd.conf.8.in b/regress/usr.sbin/bgpd/config/bgpd.conf.8.in
new file mode 100644 (file)
index 0000000..da73b5a
--- /dev/null
@@ -0,0 +1,12 @@
+# $OpenBSD: bgpd.conf.8.in,v 1.1 2018/09/10 14:20:25 benno Exp $
+# test network prefix-set
+
+AS 64512
+
+prefix-set mynetworks {
+       192.0.2.0/24
+       2001:db8:abcd::/48
+}
+
+network prefix-set mynetworks
+network prefix-set mynetworks set { community 64512:3000 }
diff --git a/regress/usr.sbin/bgpd/config/bgpd.conf.8.ok b/regress/usr.sbin/bgpd/config/bgpd.conf.8.ok
new file mode 100644 (file)
index 0000000..8885413
--- /dev/null
@@ -0,0 +1,17 @@
+AS 64512
+router-id 127.0.0.1
+socket "/var/run/bgpd.sock.0"
+holdtime min 3
+fib-priority 48
+
+prefix-set "mynetworks" {
+       192.0.2.0/24, 2001:db8:abcd::/48
+}
+
+network prefix-set mynetworks
+network prefix-set mynetworks set { community 64512:3000  }
+
+rde rib Adj-RIB-In no evaluate
+rde rib Adj-RIB-Out no evaluate
+rde rib Loc-RIB rtable 0 fib-update yes
+