summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2019-03-09 10:05:59 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2019-03-09 10:05:59 +0000
commitb9e0ee2fedbb14ed48872cb4a7cfd9d744777730 (patch)
treea81c4c8b89238b9dbe61972e19acc00995c341e6 /usr.sbin
parent38be6f96710c5eb6fce31c5f4241c848e38b7108 (diff)
Unbreak 'announce inet none' which was actually clearing way too much.
'announce inet none' should only clear AFI/SAFI pairs where the AFI is inet. OK benno@
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 b1b95be3445..e6207b6ad13 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.382 2019/03/07 07:42:36 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.383 2019/03/09 10:05:58 claudio Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1348,7 +1348,8 @@ peeropts : REMOTEAS as4number {
if ($3 == SAFI_NONE) {
for (aid = 0; aid < AID_MAX; aid++) {
- if (aid2afi(aid, &afi, &safi) == -1)
+ if (aid2afi(aid, &afi, &safi) == -1 ||
+ afi != $2)
continue;
curpeer->conf.capabilities.mp[aid] = 0;
}