summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2018-09-10 14:20:26 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2018-09-10 14:20:26 +0000
commit9309adfa86a3da3a207cc2a7f8090641820d0c20 (patch)
tree3c82f600bcbdb584e8524e83c9652aa027c4edc7 /regress
parent281e20b66a070c57c9027f4cc4d52e1c4053a9aa (diff)
add a test for network statements with prefix-sets
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.sbin/bgpd/config/Makefile4
-rw-r--r--regress/usr.sbin/bgpd/config/bgpd.conf.8.in12
-rw-r--r--regress/usr.sbin/bgpd/config/bgpd.conf.8.ok17
3 files changed, 31 insertions, 2 deletions
diff --git a/regress/usr.sbin/bgpd/config/Makefile b/regress/usr.sbin/bgpd/config/Makefile
index 3d57b5a6d6c..03568c3698d 100644
--- a/regress/usr.sbin/bgpd/config/Makefile
+++ b/regress/usr.sbin/bgpd/config/Makefile
@@ -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
index 00000000000..da73b5a65cd
--- /dev/null
+++ b/regress/usr.sbin/bgpd/config/bgpd.conf.8.in
@@ -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
index 00000000000..8885413c06e
--- /dev/null
+++ b/regress/usr.sbin/bgpd/config/bgpd.conf.8.ok
@@ -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
+