summaryrefslogtreecommitdiffstats
path: root/zebra
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2019-05-22 21:34:07 +0200
committerStephen Worley <sworley@cumulusnetworks.com>2019-05-23 18:21:15 +0200
commita5a2d802d7f4b44423dedf3f7876bdb28aebe844 (patch)
treea70af7ddf7ce2308a22d54544975522ff5e67e76 /zebra
parentlib: Explicitly cmp gateway and source based on AF (diff)
downloadfrr-a5a2d802d7f4b44423dedf3f7876bdb28aebe844.tar.xz
frr-a5a2d802d7f4b44423dedf3f7876bdb28aebe844.zip
lib,zebra,bgpd,pbrd: Compare nexthops without labels
Allow label ignoring when comparing nexthops. Specifically, add another functon nexthop_same_no_labels() that shares a path with nexthop_same() but doesn't check labels. rib_delete() needs to ignore labels in this case. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra')
-rw-r--r--zebra/zebra_rib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 297fc7e7e..b44ed3543 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -2855,7 +2855,11 @@ void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
break;
}
for (ALL_NEXTHOPS(re->ng, rtnh))
- if (nexthop_same(rtnh, nh)) {
+ /*
+ * No guarantee all kernel send nh with labels
+ * on delete.
+ */
+ if (nexthop_same_no_labels(rtnh, nh)) {
same = re;
break;
}