From: Donald Sharp Date: Tue, 28 Mar 2023 11:47:22 +0000 (-0400) Subject: bgpd: Fix debug output for route-map names when using a unsuppress-map X-Git-Tag: docker/8.5.1~29^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=4fc4779a37169eb0acc007815d42a79b65715be8;p=matthieu%2Ffrr.git 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 (cherry picked from commit 8e8ed2e1fb8adbe86135f2b9bcb47fcba6936ed3) --- 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; }