Commit 7ff34ca2 authored by Alexander Azimov's avatar Alexander Azimov Committed by Ondřej Zajíček
Browse files

BGP: Compliance with RFC8203bis

parent 0b1e1e1a
Pipeline #48003 passed with stages
in 4 minutes and 19 seconds
......@@ -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);
......
......@@ -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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment