summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2018-02-27 08:51:33 -0500
committerGitHub <noreply@github.com>2018-02-27 08:51:33 -0500
commit5cfb017a67b34f0f1ae0a82510c33de028098a6a (patch)
treebb35784da7704f9df817af9d0b5e29a16b5325c0 /zebra/zebra_rib.c
parentaa1a7fc18a77f3008aca8616c41d6e36f63f3d2c (diff)
parentb43444f53a3c21e116c66fd66fb776ffcb727205 (diff)
Merge pull request #1776 from dslicenc/static-inactive-cm19675
zebra: fix rnh deleting nht entry
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 59d9e0c2ad..5c316e077f 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -416,8 +416,6 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
if (set) {
UNSET_FLAG(nexthop->flags, NEXTHOP_FLAG_RECURSIVE);
- zebra_deregister_rnh_static_nexthops(nexthop->vrf_id,
- nexthop->resolved, top);
nexthops_free(nexthop->resolved);
nexthop->resolved = NULL;
re->nexthop_mtu = 0;
@@ -2112,7 +2110,9 @@ void rib_unlink(struct route_node *rn, struct route_entry *re)
dest->selected_fib = NULL;
/* free RE and nexthops */
- zebra_deregister_rnh_static_nexthops(re->vrf_id, re->nexthop, rn);
+ if (re->type == ZEBRA_ROUTE_STATIC)
+ zebra_deregister_rnh_static_nexthops(re->vrf_id,
+ re->nexthop, rn);
nexthops_free(re->nexthop);
XFREE(MTYPE_RE, re);
}