mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 20:51:17 +00:00
vrrpd: close sockets on shutdown
When shutting down a VRRP router, kill the sockets as well. Too dangerous to try to reuse them. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
00984df75a
commit
b7dc1bbb31
10
vrrpd/vrrp.c
10
vrrpd/vrrp.c
@ -1291,7 +1291,15 @@ static int vrrp_shutdown(struct vrrp_router *r)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Transition to the Initialize state */
|
||||
if (r->sock_rx > 0) {
|
||||
close(r->sock_rx);
|
||||
r->sock_rx = -1;
|
||||
}
|
||||
if (r->sock_tx > 0) {
|
||||
close(r->sock_tx);
|
||||
r->sock_tx = -1;
|
||||
}
|
||||
|
||||
vrrp_change_state(r, VRRP_STATE_INITIALIZE);
|
||||
|
||||
r->is_active = false;
|
||||
|
Loading…
Reference in New Issue
Block a user