There were a few cases where we were not properly de-registering
the static nexthops passed to us. This was important when
the static route was being removed for whatever reason that
we did not leave slag for the nexthop tracking.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
/* free RE and nexthops */
if (re->type == ZEBRA_ROUTE_STATIC)
- zebra_deregister_rnh_static_nexthops(re->vrf_id, re->ng.nexthop,
- rn);
+ zebra_deregister_rnh_static_nexthops(re->ng.nexthop->vrf_id,
+ re->ng.nexthop, rn);
nexthops_free(re->ng.nexthop);
XFREE(MTYPE_RE, re);
}
nh_p.u.prefix6 = nexthop->gate.ipv6;
}
route_entry_nexthop_delete(re, nexthop);
- zebra_deregister_rnh_static_nh(si->vrf_id, &nh_p, rn);
+ zebra_deregister_rnh_static_nh(si->nh_vrf_id, &nh_p, rn);
nexthop_free(nexthop);
}
/* Unlock node. */