Skip to content

Commit

Permalink
Merge pull request FRRouting#14527 from opensourcerouting/fix/guard_d…
Browse files Browse the repository at this point in the history
…ebug_messages_for_ttl

bgpd: Add guards for zlog_debug when setting GTSM for the peer
  • Loading branch information
donaldsharp authored Oct 4, 2023
2 parents 373d46d + 90aa39e commit a079aae
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 a079aae

Please sign in to comment.