summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2015-11-15 09:57:34 -0800
committervivek <vivek@cumulusnetworks.com>2015-11-15 09:57:34 -0800
commitc52d605046bb0e84775c4c18f992598e1e37f2ba (patch)
treeb5292a8dc3b157e63f5332dfe1a8e38b13b284a9
parenta219b2952ae2f3b47d674d47f48e53c6c1e4bc70 (diff)
BGP: Handle change to nexthop correctly
When a nexthop change is received and processed, the change flags are not examined correctly and route change flags not updated correctly. Fix to ensure correct handling. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-8141 Reviewed By: CCR-3773 Testing Done: Manual verification Note: Imported from 2.5-br patch bgpd-nht-fix-change-handling.patch
-rw-r--r--bgpd/bgp_nht.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index 1824771e3a..197dd87585 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -668,9 +668,11 @@ evaluate_paths (struct bgp_nexthop_cache *bnc)
else if (path->extra)
path->extra->igpmetric = 0;
- if (CHECK_FLAG(bnc->flags, BGP_NEXTHOP_METRIC_CHANGED) ||
- CHECK_FLAG(bnc->flags, BGP_NEXTHOP_CHANGED))
+ if (CHECK_FLAG(bnc->change_flags, BGP_NEXTHOP_METRIC_CHANGED) ||
+ CHECK_FLAG(bnc->change_flags, BGP_NEXTHOP_CHANGED))
SET_FLAG(path->flags, BGP_INFO_IGP_CHANGED);
+ else
+ UNSET_FLAG (path->flags, BGP_INFO_IGP_CHANGED);
bgp_process(bgp, rn, afi, SAFI_UNICAST);
}