summaryrefslogtreecommitdiff
path: root/regress/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2022-03-15 11:16:26 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2022-03-15 11:16:26 +0000
commitf6141d5c670719631659de869ea6790747524a33 (patch)
treede679c7fafcaab85d0476ae8b247e7693ecab0ea /regress/usr.sbin
parentb34bee7c7ec0cbdf25e264ffb89506da312c8ffb (diff)
Add a test for expanding macros in large-community strings.
Diffstat (limited to 'regress/usr.sbin')
-rw-r--r--regress/usr.sbin/bgpd/config/bgpd.conf.3.in7
-rw-r--r--regress/usr.sbin/bgpd/config/bgpd.conf.3.ok2
2 files changed, 7 insertions, 2 deletions
diff --git a/regress/usr.sbin/bgpd/config/bgpd.conf.3.in b/regress/usr.sbin/bgpd/config/bgpd.conf.3.in
index 1348a1f7688..edf95ce952b 100644
--- a/regress/usr.sbin/bgpd/config/bgpd.conf.3.in
+++ b/regress/usr.sbin/bgpd/config/bgpd.conf.3.in
@@ -1,10 +1,12 @@
-# $OpenBSD: bgpd.conf.3.in,v 1.1 2018/09/08 09:18:34 benno Exp $
+# $OpenBSD: bgpd.conf.3.in,v 1.2 2022/03/15 11:16:25 claudio Exp $
# in filter commands, test curly braces inside curly braces
AS 1
somepeer_v6 = "2001:DB8::1"
+someas = "64496"
+
somenets_v6 = "{ \
2001:DB8:100::/64 \
2001:DB8:200::/64 \
@@ -17,9 +19,10 @@ somemore_v6 = "{ \
}"
neighbor $somepeer_v6 {
- remote-as 64496
+ remote-as $someas
descr "v6SOMEPEER"
}
allow from $somepeer_v6 prefix $somenets_v6
allow from $somepeer_v6 prefix { $somenets_v6 $somemore_v6 }
+match from $somepeer_v6 set large-community $someas:$someas:$someas
diff --git a/regress/usr.sbin/bgpd/config/bgpd.conf.3.ok b/regress/usr.sbin/bgpd/config/bgpd.conf.3.ok
index eba12e2f1f7..4478a03c85b 100644
--- a/regress/usr.sbin/bgpd/config/bgpd.conf.3.ok
+++ b/regress/usr.sbin/bgpd/config/bgpd.conf.3.ok
@@ -1,4 +1,5 @@
somepeer_v6 = "2001:DB8::1"
+someas = "64496"
somenets_v6 = "{ 2001:DB8:100::/64 2001:DB8:200::/64 2001:DB8:300::/64 }"
somemore_v6 = "{ 2001:DB8:400::/64 2001:DB8:500::/64 }"
AS 1
@@ -26,3 +27,4 @@ allow from 2001:db8::1 prefix 2001:db8:200::/64
allow from 2001:db8::1 prefix 2001:db8:100::/64
allow from 2001:db8::1 prefix 2001:db8:500::/64
allow from 2001:db8::1 prefix 2001:db8:400::/64
+match from 2001:db8::1 set { large-community 64496:64496:64496 }