From c52d605046bb0e84775c4c18f992598e1e37f2ba Mon Sep 17 00:00:00 2001 From: vivek Date: Sun, 15 Nov 2015 09:57:34 -0800 Subject: [PATCH] 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 Reviewed-by: Donald Sharp Ticket: CM-8141 Reviewed By: CCR-3773 Testing Done: Manual verification Note: Imported from 2.5-br patch bgpd-nht-fix-change-handling.patch --- bgpd/bgp_nht.c | 6 ++++-- 1 file 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); } -- 2.39.5