From 778048bf70b19dc685cdf49d82635cedc3d78868 Mon Sep 17 00:00:00 2001 From: Ameya Dharkar Date: Fri, 10 May 2019 13:34:08 -0700 Subject: [PATCH] bgpd: BGP debug for route-map apply Display a debug message while sending a BGP route if the route is filtered by a route-map. Debug for incoming filtered route is already present. Signed-off-by: Ameya Dharkar --- bgpd/bgp_route.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 02cb72209f..82a395d8e6 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -1767,6 +1767,10 @@ int subgroup_announce_check(struct bgp_node *rn, struct bgp_path_info *pi, peer->rmap_type = 0; if (ret == RMAP_DENYMATCH) { + if (bgp_debug_update(NULL, p, subgrp->update_group, 0)) + zlog_debug("%s [Update:SEND] %s is filtered by route-map", + peer->host, prefix2str(p, buf, sizeof(buf))); + bgp_attr_flush(attr); return 0; } -- 2.39.5