mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 02:37:21 +00:00
bgpd: Revert incorrect handling of data
data is actually allowed to be NULL. So allow pass in. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
cc629aef4a
commit
b84ccd4089
@ -603,8 +603,6 @@ bgp_notify_send_with_data (struct peer *peer, u_char code, u_char sub_code,
|
||||
struct stream *s;
|
||||
int length;
|
||||
|
||||
assert (data);
|
||||
|
||||
/* Allocate new stream. */
|
||||
s = stream_new (BGP_MAX_PACKET_SIZE);
|
||||
|
||||
@ -616,7 +614,8 @@ bgp_notify_send_with_data (struct peer *peer, u_char code, u_char sub_code,
|
||||
stream_putc (s, sub_code); /* BGP notify sub_code */
|
||||
|
||||
/* If notify data is present. */
|
||||
stream_write (s, data, datalen);
|
||||
if (data)
|
||||
stream_write (s, data, datalen);
|
||||
|
||||
/* Set BGP packet length. */
|
||||
length = bgp_packet_set_size (s);
|
||||
|
Loading…
Reference in New Issue
Block a user