]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Upon interface up (update) only kick-off non-Established peers
authorvivek <vivek@cumulusnetworks.com>
Thu, 18 Aug 2016 22:02:49 +0000 (15:02 -0700)
committervivek <vivek@cumulusnetworks.com>
Thu, 18 Aug 2016 23:50:09 +0000 (16:50 -0700)
Any interface flags/parameter change (e.g., MTU, PROMISC flag change) is
notified by zebra to clients as an "up" event. BGP literally treats this
as the interface coming up and kicks all neighbors on that interface (i.e.,
directly connected peers). When doing so for IPv4 peers on the interface
(numbered or unnumbered /30-/31) or IPv6 numbered peers, peers that may
already be Established are also flapped; when doing so for IPv6 unnumbered
peers (classic 'neighbor swpX interface' scenario with no configured IP
address on interface), only peers not in Established state are processed.

This patch fixes the code to ensure that in all cases, only non-Established
peers are kicked.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Chris Cormier <chriscormier@cumulusnetworks.com>
Ticket: CM-12526
Reviewed By: CCR-5119
Testing Done: Manual, bgp-min

bgpd/bgp_nexthop.c

index 80495065b0db45aba5910daa9c19f37cd2dac96a..a58b73e9f33fd1c18df452948d38e8a3a7ec2de7 100644 (file)
@@ -236,6 +236,7 @@ bgp_connected_add (struct bgp *bgp, struct connected *ifc)
       for (ALL_LIST_ELEMENTS (bgp->peer, node, nnode, peer))
         {
           if (peer->conf_if && (strcmp (peer->conf_if, ifc->ifp->name) == 0) &&
+              peer->status != Established &&
               !CHECK_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY))
             {
               if (peer_active(peer))