mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 16:04:49 +00:00
bgpd: do not clear password if peer is dynamic
When deleting a dynamic peer, unsetting md5 password would cause it to be unset on the listener allowing unauthenticated connections from any peer in the range. Check for dynamic peers in peer delete and avoid this. Signed-off-by: Pat Ruddy <pat@voltanet.io>
This commit is contained in:
parent
a4faae3aac
commit
2734ff6bd8
@ -2284,9 +2284,9 @@ int peer_delete(struct peer *peer)
|
|||||||
/* Password configuration */
|
/* Password configuration */
|
||||||
if (CHECK_FLAG(peer->flags, PEER_FLAG_PASSWORD)) {
|
if (CHECK_FLAG(peer->flags, PEER_FLAG_PASSWORD)) {
|
||||||
XFREE(MTYPE_PEER_PASSWORD, peer->password);
|
XFREE(MTYPE_PEER_PASSWORD, peer->password);
|
||||||
|
|
||||||
if (!accept_peer && !BGP_PEER_SU_UNSPEC(peer)
|
if (!accept_peer && !BGP_PEER_SU_UNSPEC(peer)
|
||||||
&& !CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP))
|
&& !CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)
|
||||||
|
&& !CHECK_FLAG(peer->flags, PEER_FLAG_DYNAMIC_NEIGHBOR))
|
||||||
bgp_md5_unset(peer);
|
bgp_md5_unset(peer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user