From 63f1c4d918209ba4210024638011f7b9ccdd894b Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Tue, 14 Mar 2023 16:02:32 +0100 Subject: [PATCH] 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. --- nest/rt-attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nest/rt-attr.c b/nest/rt-attr.c index 7beb119b..25936d81 100644 --- a/nest/rt-attr.c +++ b/nest/rt-attr.c @@ -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) {