diff options
author | Don Slice <dslice@cumulusnetworks.com> | 2019-06-19 13:22:21 +0200 |
---|---|---|
committer | Don Slice <dslice@cumulusnetworks.com> | 2019-06-19 16:06:32 +0200 |
commit | 739c9c90e78baf139ccd5d8f0776f0f4f5a83d59 (patch) | |
tree | 4b511ee89d407d0f674b902f41321de512ae0bc9 /zebra | |
parent | Merge pull request #4554 from donaldsharp/nht_improved_debugging (diff) | |
download | frr-739c9c90e78baf139ccd5d8f0776f0f4f5a83d59.tar.xz frr-739c9c90e78baf139ccd5d8f0776f0f4f5a83d59.zip |
zebra: resolve issue with rnh not evaluating nexhops correctly
Problem discovered in testing that occasionally when an interface
address was flushed, the corresponding route would be removed from
the kernel and zebra but remain in the bgp table and be advertised
to peers. Discovered that when zebra_rib_evaluate_nexthops spun
thru the tree list of rns, if the timing and circumstances were
right, it would move elements and miss evaluating some. Changed
from frr_each to frr_each_safe and the problem is now gone.
Ticket: CM-25301
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/zebra_rib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 61645f95f..555bec959 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -761,7 +761,7 @@ void zebra_rib_evaluate_rn_nexthops(struct route_node *rn, uint32_t seq) * nht resolution and as such we need to call the * nexthop tracking evaluation code */ - frr_each (rnh_list, &dest->nht, rnh) { + frr_each_safe(rnh_list, &dest->nht, rnh) { struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(rnh->vrf_id); struct prefix *p = &rnh->node->p; |