From: Ondrej Zajicek Date: Sat, 3 May 2014 22:01:06 +0000 (+0200) Subject: Fixes BGP crash when update with some attributes and empty NLRI is received. X-Git-Tag: v1.4.4~11^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d9ab86b7ac7d1f039af92a58eb749a24811b5c9;p=thirdparty%2Fbird.git Fixes BGP crash when update with some attributes and empty NLRI is received. --- diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index b6239025d..4464523d1 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -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;