summaryrefslogtreecommitdiff
path: root/regress/usr.sbin/bgpd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2018-12-19 15:30:14 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2018-12-19 15:30:14 +0000
commit171a502941c854e2e544973a68545ac7f1e9904a (patch)
tree1b0e7fc680aed890550ab61d078d5e052ad1ad7e /regress/usr.sbin/bgpd
parentb8ee7d4a97dfb40a22aa0f333f95f12f5b6933d2 (diff)
Basic config test for various ext-community options.
Diffstat (limited to 'regress/usr.sbin/bgpd')
-rw-r--r--regress/usr.sbin/bgpd/config/Makefile4
-rw-r--r--regress/usr.sbin/bgpd/config/bgpd.conf.11.in52
-rw-r--r--regress/usr.sbin/bgpd/config/bgpd.conf.11.ok39
3 files changed, 93 insertions, 2 deletions
diff --git a/regress/usr.sbin/bgpd/config/Makefile b/regress/usr.sbin/bgpd/config/Makefile
index 11c56097500..1a9c2b436ef 100644
--- a/regress/usr.sbin/bgpd/config/Makefile
+++ b/regress/usr.sbin/bgpd/config/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.8 2018/12/04 22:28:23 bluhm Exp $
+# $OpenBSD: Makefile,v 1.9 2018/12/19 15:30:13 claudio Exp $
-BGPDTESTS=1 2 3 4 5 6 7 8 9 10
+BGPDTESTS=1 2 3 4 5 6 7 8 9 10 11
.for n in ${BGPDTESTS}
BGPD_TARGETS+=bgpd${n}
diff --git a/regress/usr.sbin/bgpd/config/bgpd.conf.11.in b/regress/usr.sbin/bgpd/config/bgpd.conf.11.in
new file mode 100644
index 00000000000..b1707a66c81
--- /dev/null
+++ b/regress/usr.sbin/bgpd/config/bgpd.conf.11.in
@@ -0,0 +1,52 @@
+# $OpenBSD: bgpd.conf.11.in,v 1.1 2018/12/19 15:30:13 claudio Exp $
+# test communities
+
+AS 64512
+
+# extended communities 2-byte AS
+match from any ext-community rt 64496:1
+match from any ext-community soo 64496:2
+match from any ext-community odi 64496:3
+match from any ext-community bdc 64496:4
+match from any ext-community srcas 64496:5
+match from any ext-community l2vid 64496:6
+# extended communities 4-byte AS
+match from any ext-community rt 4200000001:7
+match from any ext-community soo 4200000001:8
+match from any ext-community odi 4200000001:9
+match from any ext-community bdc 4200000001:10
+match from any ext-community srcas 4200000001:11
+# extended communities IPv4
+match from any ext-community rt 127.0.0.1:12
+match from any ext-community soo 127.0.0.1:13
+match from any ext-community odi 127.0.0.1:14
+match from any ext-community ori 127.0.0.1:15
+match from any ext-community l2vid 127.0.0.1:16
+match from any ext-community vrfri 127.0.0.1:17
+# extended communities opaque
+match from any ext-community ort 0x123456789ab0
+match from any ext-community defgw 0x123456789ab1
+# extended communities evpn
+match from any ext-community mac-mob 0x123456789ab2
+match from any ext-community esi-lab 0x123456789ab3
+match from any ext-community esi-rt 0x123456789ab4
+# extended communities ovs
+match from any ext-community ovs valid
+match from any ext-community ovs invalid
+match from any ext-community ovs not-found
+
+# multiple
+match from any ext-community rt 64496:201 ext-community soo 64496:202
+match from any ext-community rt 64496:301 ext-community soo 4200000001:302 ext-community odi 127.0.0.1:303
+
+# set and delete community
+match from any set ext-community rt 64496:5001
+match from any set ext-community soo 4200000001:5002
+match from any set ext-community odi 127.0.0.1:5003
+match from any set ext-community ort 0x123456789abc
+match from any set ext-community ovs valid
+match from any set ext-community delete rt 64496:6001
+match from any set ext-community delete soo 4200000001:6002
+match from any set ext-community delete odi 127.0.0.1:6003
+match from any set ext-community delete ort 0x123456789abf
+match from any set ext-community delete ovs valid
diff --git a/regress/usr.sbin/bgpd/config/bgpd.conf.11.ok b/regress/usr.sbin/bgpd/config/bgpd.conf.11.ok
new file mode 100644
index 00000000000..9fc7285ba4f
--- /dev/null
+++ b/regress/usr.sbin/bgpd/config/bgpd.conf.11.ok
@@ -0,0 +1,39 @@
+AS 64512
+router-id 127.0.0.1
+socket "/var/run/bgpd.sock.0"
+holdtime min 3
+fib-priority 48
+
+
+rde rib Adj-RIB-In no evaluate
+rde rib Adj-RIB-Out no evaluate
+rde rib Loc-RIB rtable 0 fib-update yes
+
+match from any ext-community rt 64496:1
+match from any ext-community soo 64496:2
+match from any ext-community odi 64496:3
+match from any ext-community bdc 64496:4
+match from any ext-community srcas 64496:5
+match from any ext-community l2vid 64496:6
+match from any ext-community rt 4200000001:7
+match from any ext-community soo 4200000001:8
+match from any ext-community odi 4200000001:9
+match from any ext-community bdc 4200000001:10
+match from any ext-community srcas 4200000001:11
+match from any ext-community rt 127.0.0.1:12
+match from any ext-community soo 127.0.0.1:13
+match from any ext-community odi 127.0.0.1:14
+match from any ext-community ori 127.0.0.1:15
+match from any ext-community l2vid 127.0.0.1:16
+match from any ext-community vrfri 127.0.0.1:17
+match from any ext-community ort 0x123456789ab0
+match from any ext-community defgw 0x123456789ab1
+match from any ext-community mac-mob 0x123456789ab2
+match from any ext-community esi-lab 0x123456789ab3
+match from any ext-community esi-rt 0x123456789ab4
+match from any ext-community ovs valid
+match from any ext-community ovs invalid
+match from any ext-community ovs not-found
+match from any ext-community rt 64496:201 ext-community soo 64496:202
+match from any ext-community rt 64496:301 ext-community soo 4200000001:302 ext-community odi 127.0.0.1:303
+match from any set { ext-community delete ovs valid ext-community delete ort 0x123456789abf ext-community delete odi 127.0.0.1:6003 ext-community delete soo 4200000001:6002 ext-community delete rt 64496:6001 ext-community ovs valid ext-community ort 0x123456789abc ext-community odi 127.0.0.1:5003 ext-community soo 4200000001:5002 ext-community rt 64496:5001 }