0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-17 08:38:42 +00:00

Nest: Fix recursive route update

Missing cleanup can lead to dangling pointer to old next hops.
This commit is contained in:
Ondrej Zajicek (work) 2019-10-10 14:01:16 +02:00
parent 09ee846d92
commit cb2b6e0494

View File

@ -2109,9 +2109,10 @@ no_nexthop:
else else
{ {
nhr = nhp; 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->iface = nh->iface;
nhp->weight = nh->weight; nhp->weight = nh->weight;
if (mls) if (mls)