summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2018-09-08 12:18:52 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2018-09-08 12:18:52 +0000
commit4ca1058066b1dbd83cbbb58c172b26c2e9f7f386 (patch)
tree3738db4615ed6793ce5bd0d400fd860f668b0e36 /usr.sbin
parent0766fb1cf73076e0e78a95ce7482b08b5047b004 (diff)
If BGPD_OPT_NOACTION is set don't check that the rdomain exists.
This makes it possible to use bgpd -nv in regress with unknown rdomains.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpd/parse.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index d96a15a1ed3..52ea78f05de 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.338 2018/09/08 09:33:54 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.339 2018/09/08 12:18:51 claudio Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -956,7 +956,8 @@ rdomain : RDOMAIN NUMBER optnl '{' optnl {
RT_TABLEID_MAX);
YYERROR;
}
- if (ktable_exists($2, NULL) != 1) {
+ if ((cmd_opts & BGPD_OPT_NOACTION) == 0 &&
+ ktable_exists($2, NULL) != 1) {
yyerror("rdomain %lld does not exist", $2);
YYERROR;
}