From: vivek Date: Sun, 15 Nov 2015 17:57:34 +0000 (-0800) Subject: BGP: Handle change to nexthop correctly X-Git-Tag: frr-2.0-rc1~1199^2~4 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=c52d605046bb0e84775c4c18f992598e1e37f2ba;p=mirror%2Ffrr.git 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 --- 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); }