0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-17 08:38: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:
Ondrej Zajicek 2023-03-14 16:02:32 +01:00
parent 108c4cfaf3
commit 63f1c4d918

View File

@ -1264,7 +1264,7 @@ rta__free(rta *a)
rta *
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));
for (struct nexthop **nhn = &(r->nh.next), *nho = o->nh.next; nho; nho = nho->next)
{