From: Alexander Azimov Date: Thu, 11 Jul 2019 13:44:52 +0000 (+0200) Subject: BGP: Compliance with RFC8203bis X-Git-Tag: v1.6.7~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ff6c8d83c7fee5f354d4d6ed4efc15bfc6bc7e1;p=thirdparty%2Fbird.git BGP: Compliance with RFC8203bis --- diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index d4b056beb..3d59a31bf 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -1317,7 +1317,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 665a22c12..1f93cf562 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -1539,7 +1539,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 */