mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-30 22:25:41 +00:00
bgpd: When issuing no ... ebgp-multihop
always resets
When removing the command `no neighbor <X> ebgp-multihop <Y>` the bgp code was always resetting the connection even if the command would do nothing. Fixes: #6464 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
cbdf030613
commit
6e26b2e21f
10
bgpd/bgpd.c
10
bgpd/bgpd.c
@ -4775,6 +4775,7 @@ int peer_ebgp_multihop_unset(struct peer *peer)
|
|||||||
{
|
{
|
||||||
struct peer_group *group;
|
struct peer_group *group;
|
||||||
struct listnode *node, *nnode;
|
struct listnode *node, *nnode;
|
||||||
|
int ttl;
|
||||||
|
|
||||||
if (peer->sort == BGP_PEER_IBGP)
|
if (peer->sort == BGP_PEER_IBGP)
|
||||||
return 0;
|
return 0;
|
||||||
@ -4783,9 +4784,14 @@ int peer_ebgp_multihop_unset(struct peer *peer)
|
|||||||
return BGP_ERR_NO_EBGP_MULTIHOP_WITH_TTLHACK;
|
return BGP_ERR_NO_EBGP_MULTIHOP_WITH_TTLHACK;
|
||||||
|
|
||||||
if (peer_group_active(peer))
|
if (peer_group_active(peer))
|
||||||
peer->ttl = peer->group->conf->ttl;
|
ttl = peer->group->conf->ttl;
|
||||||
else
|
else
|
||||||
peer->ttl = BGP_DEFAULT_TTL;
|
ttl = BGP_DEFAULT_TTL;
|
||||||
|
|
||||||
|
if (ttl == peer->ttl)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
peer->ttl = ttl;
|
||||||
|
|
||||||
if (!CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) {
|
if (!CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) {
|
||||||
if (BGP_IS_VALID_STATE_FOR_NOTIF(peer->status))
|
if (BGP_IS_VALID_STATE_FOR_NOTIF(peer->status))
|
||||||
|
Loading…
Reference in New Issue
Block a user