diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-12-23 23:03:26 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-01-03 16:30:27 +0100 |
commit | f8aad5d5b7601d0500841e57bafa5796cc3156ab (patch) | |
tree | 703d8427637c7e7209978816b6f19e829f69adc0 /proto/bgp/packets.c | |
parent | 256cc8ee0867d7f5314d3a3d7db5429d2bf16b4e (diff) |
Minor cleanups
Diffstat (limited to 'proto/bgp/packets.c')
-rw-r--r-- | proto/bgp/packets.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index 43149a0c..a7df1c63 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -277,6 +277,12 @@ bgp_write_capabilities(struct bgp_conn *conn, byte *buf) /* Create capability list in buffer */ + /* + * Note that max length is ~ 20+14*af_count. With max 6 channels that is + * 104. Option limit is 253 and buffer size is 4096, so we cannot overflow + * unless we add new capabilities or more AFs. + */ + WALK_AF_CAPS(caps, ac) if (ac->ready) { @@ -350,8 +356,6 @@ bgp_write_capabilities(struct bgp_conn *conn, byte *buf) *buf++ = 0; /* Capability data length */ } - /* FIXME: Should not XXXX 255 */ - return buf; } |