summaryrefslogtreecommitdiff
path: root/proto/bgp
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2018-01-02 14:30:08 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2018-01-02 14:30:08 +0100
commite62cd033079c4bc988a467f4122c7c276c77fdde (patch)
tree4b26e9cdfc3d3cf0e074f597e48199f71e4185f1 /proto/bgp
parent4842eeaad32aeeeb1774ec9840c6da03952425ff (diff)
BGP: Fix graceful restart timer
Should use remote value, not local value.
Diffstat (limited to 'proto/bgp')
-rw-r--r--proto/bgp/bgp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index 705c5e91..8da5b0aa 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -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);
}
/**