diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-04-24 10:34:55 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-04-24 10:34:55 +0000 |
commit | 682481f700eb23eb75a39b935bc0f4eb9bf0781c (patch) | |
tree | 77a7b2e8166fc6ee0fe1b8e383ae3bb185c57be7 | |
parent | fe4c3323c971252bc5d71deb2d771fecb8ef882f (diff) |
Check the various options that local-address gives.
-rw-r--r-- | regress/usr.sbin/bgpd/config/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.sbin/bgpd/config/bgpd.conf.13.in | 62 | ||||
-rw-r--r-- | regress/usr.sbin/bgpd/config/bgpd.conf.13.ok | 95 |
3 files changed, 159 insertions, 2 deletions
diff --git a/regress/usr.sbin/bgpd/config/Makefile b/regress/usr.sbin/bgpd/config/Makefile index 188d7daa960..d1f735a2b9b 100644 --- a/regress/usr.sbin/bgpd/config/Makefile +++ b/regress/usr.sbin/bgpd/config/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.10 2019/02/27 04:11:40 claudio Exp $ +# $OpenBSD: Makefile,v 1.11 2020/04/24 10:34:54 claudio Exp $ -BGPDTESTS=1 2 3 4 5 6 7 8 9 10 11 12 +BGPDTESTS=1 2 3 4 5 6 7 8 9 10 11 12 13 .for n in ${BGPDTESTS} BGPD_TARGETS+=bgpd${n} diff --git a/regress/usr.sbin/bgpd/config/bgpd.conf.13.in b/regress/usr.sbin/bgpd/config/bgpd.conf.13.in new file mode 100644 index 00000000000..9aabfd0932f --- /dev/null +++ b/regress/usr.sbin/bgpd/config/bgpd.conf.13.in @@ -0,0 +1,62 @@ +# $OpenBSD: bgpd.conf.13.in,v 1.1 2020/04/24 10:34:54 claudio Exp $ +# Only test the bare minimum configuration + +AS 1 + +group TEST { + local-address 192.0.2.1 + local-address 2001:db8:abcd::1 + + neighbor 192.0.2.2 { + remote-as 2 + } + neighbor 2001:db8:abcd::2 { + remote-as 2 + } + neighbor 192.0.2.3 { + local-address 192.0.2.254 + remote-as 3 + } + neighbor 2001:db8:abcd::3 { + local-address 2001:db8:abcd::254 + remote-as 3 + } + neighbor 192.0.2.4 { + no local-address + remote-as 4 + } + neighbor 2001:db8:abcd::4 { + no local-address + remote-as 4 + } +} + +neighbor 192.0.2.5 { + remote-as 5 +} + +neighbor 2001:db8:abcd::5 { + remote-as 5 +} + +neighbor 192.0.2.6 { + local-address 192.0.2.253 + local-address 2001:db8:abcd::253 + remote-as 6 +} + +neighbor 2001:db8:abcd::6 { + local-address 192.0.2.253 + local-address 2001:db8:abcd::253 + remote-as 6 +} + +neighbor 192.0.2.7 { + no local-address + remote-as 7 +} + +neighbor 2001:db8:abcd::7 { + no local-address + remote-as 7 +} diff --git a/regress/usr.sbin/bgpd/config/bgpd.conf.13.ok b/regress/usr.sbin/bgpd/config/bgpd.conf.13.ok new file mode 100644 index 00000000000..ad9bc57bc72 --- /dev/null +++ b/regress/usr.sbin/bgpd/config/bgpd.conf.13.ok @@ -0,0 +1,95 @@ +AS 1 +router-id 127.0.0.1 +socket "/var/run/bgpd.sock.0" + + +rde rib Adj-RIB-In no evaluate +rde rib Loc-RIB rtable 0 fib-update yes + +neighbor 2001:db8:abcd::7 { + remote-as 7 + enforce neighbor-as yes + enforce local-as yes + announce IPv6 unicast +} +neighbor 192.0.2.5 { + remote-as 5 + enforce neighbor-as yes + enforce local-as yes + announce IPv4 unicast +} +neighbor 2001:db8:abcd::5 { + remote-as 5 + enforce neighbor-as yes + enforce local-as yes + announce IPv6 unicast +} +neighbor 192.0.2.6 { + remote-as 6 + local-address 192.0.2.253 + local-address 2001:db8:abcd::253 + enforce neighbor-as yes + enforce local-as yes + announce IPv4 unicast +} +neighbor 2001:db8:abcd::6 { + remote-as 6 + local-address 192.0.2.253 + local-address 2001:db8:abcd::253 + enforce neighbor-as yes + enforce local-as yes + announce IPv6 unicast +} +neighbor 192.0.2.7 { + remote-as 7 + enforce neighbor-as yes + enforce local-as yes + announce IPv4 unicast +} +group "TEST" { + neighbor 192.0.2.2 { + remote-as 2 + local-address 192.0.2.1 + local-address 2001:db8:abcd::1 + enforce neighbor-as yes + enforce local-as yes + announce IPv4 unicast + } + neighbor 2001:db8:abcd::2 { + remote-as 2 + local-address 192.0.2.1 + local-address 2001:db8:abcd::1 + enforce neighbor-as yes + enforce local-as yes + announce IPv6 unicast + } + neighbor 192.0.2.3 { + remote-as 3 + local-address 192.0.2.254 + local-address 2001:db8:abcd::1 + enforce neighbor-as yes + enforce local-as yes + announce IPv4 unicast + } + neighbor 2001:db8:abcd::3 { + remote-as 3 + local-address 192.0.2.1 + local-address 2001:db8:abcd::254 + enforce neighbor-as yes + enforce local-as yes + announce IPv6 unicast + } + neighbor 192.0.2.4 { + remote-as 4 + enforce neighbor-as yes + enforce local-as yes + announce IPv4 unicast + } + neighbor 2001:db8:abcd::4 { + remote-as 4 + enforce neighbor-as yes + enforce local-as yes + announce IPv6 unicast + } +} + |