summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2019-08-01 17:36:56 -0400
committerStephen Worley <sworley@cumulusnetworks.com>2019-10-25 11:13:42 -0400
commitbc541126e4058b6139f6b693a1adc9af2332317d (patch)
tree2bf53a2d9f076dcd1c352459476553ccdee75d91 /zebra/zebra_rib.c
parent815059466cdfb022ff5beec55f7ffee649db7600 (diff)
zebra: Use nexthop object id on route delete
When we receive a route delete from the kernel and it contains a nexthop object id, use that to match against route gateways with instead of explicit nexthops. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index bc647864ff..1440171584 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -2854,8 +2854,8 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p,
void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
unsigned short instance, int flags, struct prefix *p,
struct prefix_ipv6 *src_p, const struct nexthop *nh,
- uint32_t table_id, uint32_t metric, uint8_t distance,
- bool fromkernel)
+ uint32_t nhe_id, uint32_t table_id, uint32_t metric,
+ uint8_t distance, bool fromkernel)
{
struct route_table *table;
struct route_node *rn;
@@ -2926,7 +2926,10 @@ void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
break;
}
/* Make sure that the route found has the same gateway. */
- else {
+ else if (nhe_id && re->nhe_id == nhe_id) {
+ same = re;
+ break;
+ } else {
if (nh == NULL) {
same = re;
break;