From: claudio Date: Sat, 8 Sep 2018 12:18:51 +0000 (+0000) Subject: If BGPD_OPT_NOACTION is set don't check that the rdomain exists. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1797c38df5d7ad30a171822948bf71a8005e3600;p=openbsd 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. --- 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 @@ -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; }