This commit is contained in:
guoguojia2021 2025-04-29 16:22:43 +00:00 committed by GitHub
commit b04d0dbc59
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7145,7 +7145,10 @@ int peer_password_unset(struct peer *peer)
/* Attempt to uninstall password on socket. */
if (!BGP_CONNECTION_SU_UNSPEC(peer->connection))
bgp_md5_unset(peer->connection);
if (CHECK_FLAG(peer->flags, PEER_FLAG_PASSWORD))
bgp_md5_set(peer->connection);
else
bgp_md5_unset(peer->connection);
/* Skip peer-group mechanics for regular peers. */
return 0;
}