]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Revert incorrect handling of data
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 16 May 2017 02:29:10 +0000 (22:29 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 16 May 2017 02:30:48 +0000 (22:30 -0400)
data is actually allowed to be NULL.  So allow
pass in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_packet.c

index ca211589f7cff48b8e8e519f6fb64d8c52a7478a..0800dd74bafa5b6dd41d76e589544e5d3178b733 100644 (file)
@@ -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);