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

index 35f1f5884c738424c8147c4d105b131884b70b09..c8aeb292c75f7412c6d87331ad6d19b7e7ed2b00 100644 (file)
@@ -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);
index d348ebc1ec456c70700fd927fe8f530cb6d3e7a2..c7cc1d0108c0412378240c55903580ae100195ea 100644 (file)
@@ -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 */