mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-03-21 22:07:03 +00:00
BGP: Compliance with RFC8203bis
This commit is contained in:
parent
78c05cc159
commit
9ff6c8d83c
@ -1317,7 +1317,7 @@ bgp_shutdown(struct proto *P)
|
|||||||
if (message)
|
if (message)
|
||||||
{
|
{
|
||||||
uint msg_len = strlen(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 */
|
/* Buffer will be freed automatically by protocol shutdown */
|
||||||
data = mb_alloc(p->p.pool, msg_len + 1);
|
data = mb_alloc(p->p.pool, msg_len + 1);
|
||||||
|
@ -1539,7 +1539,7 @@ bgp_handle_message(struct bgp_proto *p, byte *data, uint len, byte **bp)
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* Handle proper message */
|
/* Handle proper message */
|
||||||
if ((msg_len > 128) && (msg_len + 1 > len))
|
if ((msg_len > 255) && (msg_len + 1 > len))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Some elementary cleanup */
|
/* Some elementary cleanup */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user