Merge pull request #7491 from volta-networks/fix_ebgp_mhop_reset

bgpd: avoid needless ebgp-multihop session reset
This commit is contained in:
Donald Sharp 2020-11-10 18:50:10 -05:00 committed by GitHub
commit 49201fe505
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4505,6 +4505,10 @@ int peer_ebgp_multihop_set(struct peer *peer, int ttl)
if (peer->sort == BGP_PEER_IBGP || peer->conf_if)
return 0;
/* is there anything to do? */
if (peer->ttl == ttl)
return 0;
/* see comment in peer_ttl_security_hops_set() */
if (ttl != MAXTTL) {
if (CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) {