From 8e8ed2e1fb8adbe86135f2b9bcb47fcba6936ed3 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 28 Mar 2023 07:47:22 -0400 Subject: [PATCH] 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 --- bgpd/bgp_route.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index efdc907971..4441e86fbb 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -2386,7 +2386,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; } -- 2.39.5