]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BGP: Compliance with RFC8203bis
authorAlexander Azimov <a.e.azimov@gmail.com>
Thu, 11 Jul 2019 13:44:52 +0000 (15:44 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 11 Jul 2019 13:44:52 +0000 (15:44 +0200)
proto/bgp/bgp.c
proto/bgp/packets.c

index d4b056bebeb3beac0c99ba96c1c10f66b4f85590..3d59a31bf5836a18527265f04fa79a65534b3dcd 100644 (file)
@@ -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);
index 665a22c129573da4f214ab624577832ac9697ca1..1f93cf562d154eacbd61dad511e1d3f269f0ce1f 100644 (file)
@@ -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 */