mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-29 06:10:37 +00:00
bgpd: BGP-GR peer router restart-time should be reset.
When the peer router's gr mode had changed from helper/restart to disable. The local bgp gr router should reset the peer router's restart-time stored. Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
This commit is contained in:
parent
6102cb7fe4
commit
34aa744869
@ -830,6 +830,7 @@ static int bgp_capability_parse(struct peer *peer, size_t length,
|
||||
int ret;
|
||||
struct stream *s = BGP_INPUT(peer);
|
||||
size_t end = stream_get_getp(s) + length;
|
||||
uint16_t restart_flag_time = 0;
|
||||
|
||||
assert(STREAM_READABLE(s) >= length);
|
||||
|
||||
@ -1006,6 +1007,12 @@ static int bgp_capability_parse(struct peer *peer, size_t length,
|
||||
caphdr.length);
|
||||
stream_set_getp(s, start + caphdr.length);
|
||||
}
|
||||
|
||||
if (!CHECK_FLAG(peer->cap, PEER_CAP_RESTART_RCV)) {
|
||||
UNSET_FLAG(restart_flag_time, 0xF000);
|
||||
peer->v_gr_restart = restart_flag_time;
|
||||
}
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user