1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

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.
This commit is contained in:
Nasato Goto
2020-04-15 03:46:53 +02:00
committed by Ondrej Zajicek (work)
parent fd9f0c0640
commit a6548d5b5b
2 changed files with 2 additions and 1 deletions

View File

@@ -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);