summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-03-28 07:47:22 -0400
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2023-03-28 15:19:43 +0000
commit4fc4779a37169eb0acc007815d42a79b65715be8 (patch)
tree6355fc8a91c31a46d0fc22b418195438eb8b9ca2
parent6d305dda4f65c6852e4446c465d54697e0410534 (diff)
bgpd: Fix debug output for route-map names when using a unsuppress-map
Log is printing this with this config: 2023-03-28 07:36:47.007 [DEBG] bgpd: [Q9J6Z-09HRR] 192.168.119.120 [Update:SEND] 1.2.3.33/32 is filtered by route-map '(null)' Here's the config: address-family ipv4 unicast network 1.2.3.33/32 network 1.2.3.34/32 aggregate-address 1.2.3.0/24 summary-only redistribute table 33 route-map foo neighbor 192.168.119.120 route-map DENY in neighbor 192.168.119.120 unsuppress-map UNSUPPRESS ip prefix-list UNSUPPRESS seq 5 permit 1.2.3.4/32 ip prefix-list UNSUPPRESS seq 10 permit 1.2.3.5/32 ip prefix-list UNSUPPRESS seq 15 permit 1.2.3.6/32 Signed-off-by: Donald Sharp <sharpd@nvidia.com> (cherry picked from commit 8e8ed2e1fb8adbe86135f2b9bcb47fcba6936ed3)
-rw-r--r--bgpd/bgp_route.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 5d34e292d0..94f9e5b1e7 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -2374,7 +2374,10 @@ bool subgroup_announce_check(struct bgp_dest *dest, struct bgp_path_info *pi,
if (bgp_debug_update(NULL, p, subgrp->update_group, 0))
zlog_debug(
"%pBP [Update:SEND] %pFX is filtered by route-map '%s'",
- peer, p, ROUTE_MAP_OUT_NAME(filter));
+ peer, p,
+ bgp_path_suppressed(pi)
+ ? UNSUPPRESS_MAP_NAME(filter)
+ : ROUTE_MAP_OUT_NAME(filter));
bgp_attr_flush(rmap_path.attr);
return false;
}