]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd-addpath-rx-cap-fix.patch
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 12 Jun 2015 14:59:11 +0000 (07:59 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 12 Jun 2015 14:59:11 +0000 (07:59 -0700)
BGP: Make Addpath capability failure handling more inline with other cap.

Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
bgpd/bgp_open.c

index ddc8f9e8a62da02be92ce4751e1327b82138feef..9cda5f4681601cf42f41f33cb0ac5d7ce5883751 100644 (file)
@@ -439,7 +439,21 @@ bgp_capability_addpath (struct peer *peer, struct capability_header *hdr)
                     (send_receive & BGP_ADDPATH_TX) ? ", transmit" : "");
 
       if (!bgp_afi_safi_valid_indices (afi, &safi))
-        return -1;
+        {
+          if (bgp_debug_neighbor_events(peer))
+            zlog_debug ("%s Addr-family %d/%d(afi/safi) not supported."
+                        " Ignore the Addpath Attribute for this AFI/SAFI",
+                        peer->host, afi, safi);
+         continue;
+        }
+      else if (!peer->afc[afi][safi])
+        {
+          if (bgp_debug_neighbor_events(peer))
+            zlog_debug ("%s Addr-family %d/%d(afi/safi) not enabled."
+                        " Ignore the AddPath capability for this AFI/SAFI",
+                        peer->host, afi, safi);
+         continue;
+        }
 
       if (send_receive & BGP_ADDPATH_RX)
         SET_FLAG (peer->af_cap[afi][safi], PEER_CAP_ADDPATH_AF_RX_RCV);