From 823b8f7cd2ab75627c8ba605f189c07ca7108b2c Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 12 Jun 2015 07:59:11 -0700 Subject: [PATCH] bgpd-addpath-rx-cap-fix.patch BGP: Make Addpath capability failure handling more inline with other cap. Signed-off-by: Dinesh G Dutt --- bgpd/bgp_open.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index ddc8f9e8a6..9cda5f4681 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -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); -- 2.39.5