From: claudio Date: Fri, 18 Nov 2022 10:26:04 +0000 (+0000) Subject: Add aspa-set config test. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=95eccd269ececd27bc9a40d1850178073dda15de;p=openbsd Add aspa-set config test. --- diff --git a/regress/usr.sbin/bgpd/config/Makefile b/regress/usr.sbin/bgpd/config/Makefile index d1f735a2b9b..9519fb5e42b 100644 --- a/regress/usr.sbin/bgpd/config/Makefile +++ b/regress/usr.sbin/bgpd/config/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.11 2020/04/24 10:34:54 claudio Exp $ +# $OpenBSD: Makefile,v 1.12 2022/11/18 10:26:04 claudio Exp $ -BGPDTESTS=1 2 3 4 5 6 7 8 9 10 11 12 13 +BGPDTESTS=1 2 3 4 5 6 7 8 9 10 11 12 13 14 .for n in ${BGPDTESTS} BGPD_TARGETS+=bgpd${n} diff --git a/regress/usr.sbin/bgpd/config/bgpd.conf.14.in b/regress/usr.sbin/bgpd/config/bgpd.conf.14.in new file mode 100644 index 00000000000..42b8f5c6964 --- /dev/null +++ b/regress/usr.sbin/bgpd/config/bgpd.conf.14.in @@ -0,0 +1,36 @@ +# $OpenBSD: bgpd.conf.14.in,v 1.1 2022/11/18 10:26:04 claudio Exp $ +# test roa-set blocks + +AS 1 + +roa-set { + 192.0.2.0/24 source-as 1 +} + +origin-set test { + 192.0.2.0/24 source-as 1 +} + +aspa-set { } +aspa-set { customer-as 17 provider-as { 12 } } +aspa-set { + customer-as 1 provider-as { 2 } + customer-as 1 provider-as { 3 } + customer-as 1 provider-as { 4 5 6 } +} + +aspa-set { + customer-as 41 provider-as { 2 } + customer-as 42 expires 12345 provider-as { 3 } + customer-as 42 expires 10000 provider-as { 4 } +} +aspa-set { + customer-as 3 provider-as { 5 } + customer-as 2 expires 1668181648 provider-as { 3 4 } + customer-as 5 provider-as { 1 2 allow inet 7 allow inet6 } +} + + +#match from any aspa unknown +#match from any aspa invalid +#match from any aspa valid diff --git a/regress/usr.sbin/bgpd/config/bgpd.conf.14.ok b/regress/usr.sbin/bgpd/config/bgpd.conf.14.ok new file mode 100644 index 00000000000..f0a7bcbf72d --- /dev/null +++ b/regress/usr.sbin/bgpd/config/bgpd.conf.14.ok @@ -0,0 +1,28 @@ +AS 1 +router-id 127.0.0.1 +socket "/var/run/bgpd.sock.0" +listen on 0.0.0.0 +listen on :: + +roa-set { + 192.0.2.0/24 source-as 1 +} + +aspa-set { + customer-as 1 provider-as { 2 3 4 5 6 } + customer-as 2 expires 1668181648 provider-as { 3 4 } + customer-as 3 provider-as { 5 } + customer-as 5 provider-as { 1 2 allow inet 7 allow inet6 } + customer-as 17 provider-as { 12 } + customer-as 41 provider-as { 2 } + customer-as 42 expires 12345 provider-as { 3 4 } +} + +origin-set "test" { + 192.0.2.0/24 source-as 1 +} + + +rde rib Adj-RIB-In no evaluate +rde rib Loc-RIB rtable 0 fib-update yes +