Commit cb2b6e04 authored by Ondřej Zajíček's avatar Ondřej Zajíček
Browse files

Nest: Fix recursive route update

Missing cleanup can lead to dangling pointer to old next hops.
parent 09ee846d
Pipeline #54004 passed with stages
in 7 minutes and 53 seconds
......@@ -2109,9 +2109,10 @@ no_nexthop:
else
{
nhr = nhp;
nhp = (nhp ? (nhp->next = lp_allocz(rte_update_pool, NEXTHOP_MAX_SIZE)) : &(a->nh));
nhp = (nhp ? (nhp->next = lp_alloc(rte_update_pool, NEXTHOP_MAX_SIZE)) : &(a->nh));
}
memset(nhp, 0, NEXTHOP_MAX_SIZE);
nhp->iface = nh->iface;
nhp->weight = nh->weight;
if (mls)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment