Skip to content

Commit

Permalink
Merge pull request #16471 from opensourcerouting/fix/treat_as_withdra…
Browse files Browse the repository at this point in the history
…w_stats

bgpd: Do not increment treat-as-withdraw counters if debug is enabled
  • Loading branch information
donaldsharp authored Jul 26, 2024
2 parents 07489b4 + b1b1c92 commit f7eac63
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bgpd/bgp_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -2390,13 +2390,13 @@ static int bgp_update_receive(struct peer_connection *connection,
ret = bgp_dump_attr(&attr, peer->rcvd_attr_str,
sizeof(peer->rcvd_attr_str));

peer->stat_upd_7606++;

if (attr_parse_ret == BGP_ATTR_PARSE_WITHDRAW)
if (attr_parse_ret == BGP_ATTR_PARSE_WITHDRAW) {
peer->stat_upd_7606++;
flog_err(
EC_BGP_UPDATE_RCV,
"%pBP rcvd UPDATE with errors in attr(s)!! Withdrawing route.",
peer);
}

if (ret && bgp_debug_update(peer, NULL, NULL, 1) &&
BGP_DEBUG(update, UPDATE_DETAIL)) {
Expand Down

0 comments on commit f7eac63

Please sign in to comment.