Nest: Fix recursive route update
Missing cleanup can lead to dangling pointer to old next hops.
This commit is contained in:
parent
09ee846d92
commit
cb2b6e0494
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue