From 74ffab30c360e2a603247f574577b3a8a74db4b2 Mon Sep 17 00:00:00 2001 From: Peter Pentchev Date: Mon, 12 Sep 2011 16:30:31 +0400 Subject: bgpd: fix parsing of graceful restart cap. (#663) "While setting up a testbed, I ran across a little problem in the parsing of the "graceful restart" BGP capability that resulted in Quagga not actually activating it for the peer in question - when the peer sent a single AFI/SAFI block." * bgp_open.c * bgp_capability_restart(): actually process the last AFI/SAFI block --- bgpd/bgp_open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index 31b7369d..82deb3d0 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -380,7 +380,7 @@ bgp_capability_restart (struct peer *peer, struct capability_header *caphdr) peer->v_gr_restart); } - while (stream_get_getp (s) + 4 < end) + while (stream_get_getp (s) + 4 <= end) { afi_t afi = stream_getw (s); safi_t safi = stream_getc (s); -- cgit v1.2.1