summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
authorNasato Goto <goto@mfeed.ad.jp>2020-04-15 03:46:53 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2020-04-15 03:46:53 +0200
commita6548d5b5be1d0186dfab43b76790803f8c8625e (patch)
tree19362cce5fbe5ad84ad764ca1ce2a6e1be804f3a /nest
parentfd9f0c0640fd02a26b96b4f9d3cbbffbb6544a84 (diff)
BGP: Fix handling of 16bit-only ASN translation
The bug generated invalid AGGREGATOR attribute during translation of 32bit ASN to 16bit-only BGP peer. The patch fixes that.
Diffstat (limited to 'nest')
-rw-r--r--nest/attrs.h2
1 files changed, 1 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;
}