From: Alexander Azimov Date: Tue, 30 Apr 2019 11:55:43 +0000 (+0200) Subject: BGP: Compliance with RFC8203bis X-Git-Tag: v2.0.5~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ff34ca2cb86f3947bf049f73e76e6ce5d57e4a8;p=thirdparty%2Fbird.git BGP: Compliance with RFC8203bis --- diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 35f1f5884..c8aeb292c 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -1611,7 +1611,7 @@ bgp_shutdown(struct proto *P) if (message) { uint msg_len = strlen(message); - msg_len = MIN(msg_len, 128); + msg_len = MIN(msg_len, 255); /* Buffer will be freed automatically by protocol shutdown */ data = mb_alloc(p->p.pool, msg_len + 1); diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index d348ebc1e..c7cc1d010 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -2893,7 +2893,7 @@ bgp_handle_message(struct bgp_proto *p, byte *data, uint len, byte **bp) return 1; /* Handle proper message */ - if ((msg_len > 128) && (msg_len + 1 > len)) + if ((msg_len > 255) && (msg_len + 1 > len)) return 0; /* Some elementary cleanup */