Commit 509aab5d authored by Ondřej Zajíček's avatar Ondřej Zajíček

Fixes serious bug in BGP add-path

Temporary rta is reused in BGP, while rta_lookup() breaks it.

Thanks to Alexander Chernikov for analysing the problem.
parent af454f9b
......@@ -999,7 +999,11 @@ bgp_rte_update(struct bgp_proto *p, ip_addr prefix, int pxlen,
if (!*a)
{
a0->src = *src;
/* Workaround for rta_lookup() breaking eattrs */
ea_list *ea = a0->eattrs;
*a = rta_lookup(a0);
a0->eattrs = ea;
}
net *n = net_get(p->p.table, prefix, pxlen);
......
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