From 0656ff59c2e021f898cabcd2211f48360358bdf8 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 28 Aug 2024 16:25:43 +0200 Subject: [PATCH] bgp bucket fixup --- proto/bgp/packets.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index 82c1230e..da47169c 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -2531,13 +2531,12 @@ bgp_bmp_encode_rte(ea_list *c, struct bgp_proto *bgp_p, byte *buf, const net_add struct lp_state *tmpp = lp_save(tmp_linpool); /* Temporary bucket */ - struct bgp_bucket *b = tmp_allocz(sizeof(struct bgp_bucket)); - b->attrs = tmp_allocz(ea_size); + struct bgp_bucket *b = tmp_allocz(sizeof(struct bgp_bucket) + ea_size); b->bmp = 1; init_list(&b->prefixes); if (attrs) - memcpy(b->attrs, attrs, ea_size); + memcpy(b->eattrs, attrs, ea_size); /* Temporary prefix */ struct bgp_prefix *px = tmp_allocz(prefix_size);