mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-08 12:18:42 +00:00
Use RTA_MAX_SIZE in rta_do_cow()
This allows to modify MPLS label stack in filters. Fixes a bug in handling of 'gw_mpls' attribute.
This commit is contained in:
parent
108c4cfaf3
commit
63f1c4d918
@ -1264,7 +1264,7 @@ rta__free(rta *a)
|
|||||||
rta *
|
rta *
|
||||||
rta_do_cow(rta *o, linpool *lp)
|
rta_do_cow(rta *o, linpool *lp)
|
||||||
{
|
{
|
||||||
rta *r = lp_alloc(lp, rta_size(o));
|
rta *r = lp_alloc(lp, RTA_MAX_SIZE);
|
||||||
memcpy(r, o, rta_size(o));
|
memcpy(r, o, rta_size(o));
|
||||||
for (struct nexthop **nhn = &(r->nh.next), *nho = o->nh.next; nho; nho = nho->next)
|
for (struct nexthop **nhn = &(r->nh.next), *nho = o->nh.next; nho; nho = nho->next)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user