summaryrefslogtreecommitdiff
path: root/nest/rt-attr.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2023-03-14 16:02:32 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2023-10-24 14:25:18 +0200
commit63f1c4d918209ba4210024638011f7b9ccdd894b (patch)
treea9c0f06b14b55afbfc258de0b390794ed8ac20b3 /nest/rt-attr.c
parent108c4cfaf3b0fda5daf4bccf2f1ea45d7f3a271d (diff)
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.
Diffstat (limited to 'nest/rt-attr.c')
-rw-r--r--nest/rt-attr.c2
1 files changed, 1 insertions, 1 deletions
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)
{