From: Ondrej Zajicek Date: Tue, 14 Mar 2023 15:02:32 +0000 (+0100) Subject: Use RTA_MAX_SIZE in rta_do_cow() X-Git-Tag: v2.15~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=63f1c4d918209ba4210024638011f7b9ccdd894b;p=thirdparty%2Fbird.git 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. --- diff --git a/nest/rt-attr.c b/nest/rt-attr.c index 7beb119b7..25936d81d 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) {