diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2018-09-08 12:29:20 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2018-09-08 12:29:20 +0000 |
commit | ab3d8165af1c9f2babd5d5b6d0cd50ccb7b15c95 (patch) | |
tree | 92b6b8977c233c94ff54e4261d843b40d4933e80 /usr.sbin/bgpd | |
parent | 4ca1058066b1dbd83cbbb58c172b26c2e9f7f386 (diff) |
More BGPD_OPT_NOACTION checking to make regress happier.
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/parse.y | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index 52ea78f05de..21fb38b57ca 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.339 2018/09/08 12:18:51 claudio Exp $ */ +/* $OpenBSD: parse.y,v 1.340 2018/09/08 12:29:19 claudio Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1073,14 +1073,17 @@ rdomainopts : RD STRING { | network | DEPEND ON STRING { /* XXX this is a hack */ - if (if_nametoindex($3) == 0) { + if ((cmd_opts & BGPD_OPT_NOACTION) == 0 && + if_nametoindex($3) == 0) { yyerror("interface %s does not exist", $3); free($3); YYERROR; } strlcpy(currdom->ifmpe, $3, IFNAMSIZ); free($3); - if (get_mpe_label(currdom)) { + /* XXX this is in the wrong place */ + if ((cmd_opts & BGPD_OPT_NOACTION) == 0 && + get_mpe_label(currdom)) { yyerror("failed to get mpls label from %s", currdom->ifmpe); YYERROR; |