summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nest/attrs.h2
-rw-r--r--proto/bgp/attrs.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/nest/attrs.h b/nest/attrs.h
index 3a4b0acd..d88a73f3 100644
--- a/nest/attrs.h
+++ b/nest/attrs.h
@@ -111,7 +111,7 @@ static inline struct adata *
aggregator_to_old(struct linpool *pool, const struct adata *a)
{
struct adata *d = lp_alloc_adata(pool, 8);
- put_u32(d->data, 0xFFFF);
+ put_u32(d->data, AS_TRANS);
memcpy(d->data + 4, a->data + 4, 4);
return d;
}
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c
index 39297dd7..655ddb62 100644
--- a/proto/bgp/attrs.c
+++ b/proto/bgp/attrs.c
@@ -577,6 +577,7 @@ bgp_encode_aggregator(struct bgp_write_state *s, eattr *a, byte *buf, uint size)
/* Prepare 16-bit AGGREGATOR (from 32-bit one) in a temporary buffer */
byte *dst = alloca(6);
len = aggregator_32to16(dst, data);
+ data = dst;
}
return bgp_put_attr(buf, size, BA_AGGREGATOR, a->flags, data, len);