diff options
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index e61c2e7b0e..ed53554265 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -2274,7 +2274,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, u_short instance, int flags, struct prefix *p, struct prefix_ipv6 *src_p, union g_addr *gate, - ifindex_t ifindex, u_int32_t table_id) + ifindex_t ifindex, u_int32_t table_id, + u_int32_t metric) { struct route_table *table; struct route_node *rn; @@ -2328,6 +2329,9 @@ void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type, continue; if (re->instance != instance) continue; + if (re->type == ZEBRA_ROUTE_KERNEL && + re->metric != metric) + continue; if (re->type == ZEBRA_ROUTE_CONNECT && (nexthop = re->nexthop) && nexthop->type == NEXTHOP_TYPE_IFINDEX) { if (nexthop->ifindex != ifindex) @@ -2468,6 +2472,9 @@ int rib_add(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type, u_short instance, continue; if (re->instance != instance) continue; + if (re->type == ZEBRA_ROUTE_KERNEL && + re->metric != metric) + continue; if (!RIB_SYSTEM_ROUTE(re)) { same = re; break; |
