We set peer->ttl according if it's iBGP or eBGP, but when setting the TTL,
we technically ignore it.
Relax a bit and set TTL only if no GTSM configured.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
{
int ret = 0;
- /* In case of peer is EBGP, we should set TTL for this connection. */
- if (!peer->gtsm_hops && (peer_sort_lookup(peer) == BGP_PEER_EBGP)) {
+ if (!peer->gtsm_hops) {
ret = sockopt_ttl(peer->su.sa.sa_family, bgp_sock, peer->ttl);
if (ret) {
flog_err(
__func__, &peer->remote_id, errno);
return ret;
}
- } else if (peer->gtsm_hops) {
+ } else {
/* On Linux, setting minttl without setting ttl seems to mess
with the
outgoing ttl. Therefore setting both.