diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2014-05-04 00:01:06 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2014-05-04 11:49:41 +0200 |
commit | 66370eac1f88ec74b3017f1c39038d7b8b776de6 (patch) | |
tree | 4e46ef380b6de259231a29549b3b19cbc5aa85fd /proto | |
parent | c865cae3eb327d1e0a745352c483bc7cb00f9323 (diff) |
Fixes BGP crash when update with some attributes and empty NLRI is received.
Thanks to Charlie Allom for the bugreport.
Diffstat (limited to 'proto')
-rw-r--r-- | proto/bgp/packets.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index b6239025..4464523d 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; |