Skip to content

Commit

Permalink
bgpd: Add guards for zlog_debug when setting GTSM for the peer
Browse files Browse the repository at this point in the history
Signed-off-by: Donatas Abraitis <[email protected]>
  • Loading branch information
ton31337 committed Oct 3, 2023
1 parent 373d46d commit 90aa39e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -7837,8 +7837,9 @@ int peer_ttl_security_hops_set(struct peer *peer, int gtsm_hops)
struct listnode *node, *nnode;
int ret;

zlog_debug("%s: set gtsm_hops to %d for %s", __func__, gtsm_hops,
peer->host);
if (bgp_debug_neighbor_events(peer))
zlog_debug("%s: set gtsm_hops to %d for %s", __func__,
gtsm_hops, peer->host);

/* We cannot configure ttl-security hops when ebgp-multihop is already
set. For non peer-groups, the check is simple. For peer-groups,
Expand Down Expand Up @@ -7947,7 +7948,9 @@ int peer_ttl_security_hops_unset(struct peer *peer)
struct listnode *node, *nnode;
int ret = 0;

zlog_debug("%s: set gtsm_hops to zero for %s", __func__, peer->host);
if (bgp_debug_neighbor_events(peer))
zlog_debug("%s: set gtsm_hops to zero for %s", __func__,
peer->host);

/* if a peer-group member, then reset to peer-group default rather than
* 0 */
Expand Down

0 comments on commit 90aa39e

Please sign in to comment.