]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BGP: Fix graceful restart timer
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 2 Jan 2018 13:30:08 +0000 (14:30 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 2 Jan 2018 13:30:08 +0000 (14:30 +0100)
Should use remote value, not local value.

proto/bgp/bgp.c

index 705c5e91708f4f24a67bf899fe8ff942973d816d..8da5b0aa41845513c48de159bc3f92d838411e1b 100644 (file)
@@ -689,8 +689,11 @@ bgp_handle_graceful_restart(struct bgp_proto *p)
     c->packets_to_send = 0;
   }
 
+  /* p->gr_ready -> at least one active channel is c->gr_ready */
+  ASSERT(p->gr_active_num > 0);
+
   proto_notify_state(&p->p, PS_START);
-  bgp_start_timer(p->gr_timer, p->conn->local_caps->gr_time);
+  bgp_start_timer(p->gr_timer, p->conn->remote_caps->gr_time);
 }
 
 /**