Commit 9ff6c8d8 authored by Alexander Azimov's avatar Alexander Azimov Committed by Ondrej Zajicek (work)
Browse files

BGP: Compliance with RFC8203bis

parent 78c05cc1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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 */