diff options
| author | Paul Jakma <paul@opensourcerouting.org> | 2014-10-14 11:14:06 +0100 |
|---|---|---|
| committer | Daniel Walton <dwalton@cumulusnetworks.com> | 2016-05-26 01:16:54 +0000 |
| commit | 4b52acf99215389ce149c09ee06b4cae8f8f4546 (patch) | |
| tree | 152c65a4550031a9f66dc098353c6880a835e93d | |
| parent | bdcf8f59a49d01202c9740f4be9c5e51420a61a8 (diff) | |
bgpd: trivial, remove unneeded extra variable in bgp_capability_restart
(cherry picked from commit ec98d90767b341877fb7f1547f025b946955899a)
| -rw-r--r-- | bgpd/bgp_open.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index 18d135997d..06cf8a17b1 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -395,7 +395,6 @@ bgp_capability_restart (struct peer *peer, struct capability_header *caphdr) { struct stream *s = BGP_INPUT (peer); u_int16_t restart_flag_time; - int restart_bit = 0; size_t end = stream_get_getp (s) + caphdr->length; /* Verify length is a multiple of 4 */ @@ -409,10 +408,8 @@ bgp_capability_restart (struct peer *peer, struct capability_header *caphdr) SET_FLAG (peer->cap, PEER_CAP_RESTART_RCV); restart_flag_time = stream_getw(s); if (CHECK_FLAG (restart_flag_time, RESTART_R_BIT)) - { - SET_FLAG (peer->cap, PEER_CAP_RESTART_BIT_RCV); - restart_bit = 1; - } + SET_FLAG (peer->cap, PEER_CAP_RESTART_BIT_RCV); + UNSET_FLAG (restart_flag_time, 0xF000); peer->v_gr_restart = restart_flag_time; @@ -420,7 +417,9 @@ bgp_capability_restart (struct peer *peer, struct capability_header *caphdr) { zlog_debug ("%s OPEN has Graceful Restart capability", peer->host); zlog_debug ("%s Peer has%srestarted. Restart Time : %d", - peer->host, restart_bit ? " " : " not ", + peer->host, + CHECK_FLAG (peer->cap, PEER_CAP_RESTART_BIT_RCV) ? " " + : " not ", peer->v_gr_restart); } |
