]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixes BGP crash when update with some attributes and empty NLRI is received.
authorOndrej Zajicek <santiago@crfreenet.org>
Sat, 3 May 2014 22:01:06 +0000 (00:01 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Sat, 3 May 2014 22:01:06 +0000 (00:01 +0200)
proto/bgp/packets.c

index b6239025d0dcdc7a1da450adc329c97840839f66..4464523d14cd22a39ce88877469f414b30a7c6b3 100644 (file)
@@ -1112,7 +1112,7 @@ bgp_do_rx_update(struct bgp_conn *conn,
   if (conn->state != BS_ESTABLISHED)   /* fatal error during decoding */
     return;
 
-  if (a0 && bgp_set_next_hop(p, a0))
+  if (a0 && nlri_len && !bgp_set_next_hop(p, a0))
     a0 = NULL;
 
   last_id = 0;