From: Rafael Zalamena Date: Thu, 22 Oct 2020 00:48:43 +0000 (-0300) Subject: bgpd,topotests: log route suppression messages X-Git-Tag: base_7.6~373^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=6ba6de7e172afdbbd82cb2a3eb1f6b091900d1ea;p=matthieu%2Ffrr.git bgpd,topotests: log route suppression messages To see the messages activate the BGP debug: `debug bgp updates`. Signed-off-by: Rafael Zalamena --- diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index c47b610584..1edcbc39b6 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -6257,6 +6257,10 @@ static bool aggr_suppress_path(struct bgp_aggregate *aggregate, /* Only mark for processing if suppressed. */ if (listcount(pie->aggr_suppressors) == 1) { + if (BGP_DEBUG(update, UPDATE_OUT)) + zlog_debug("aggregate-address suppressing: %pFX", + bgp_dest_get_prefix(pi->net)); + bgp_path_info_set_flag(pi->net, pi, BGP_PATH_ATTR_CHANGED); return true; } @@ -6280,6 +6284,10 @@ static bool aggr_unsuppress_path(struct bgp_aggregate *aggregate, /* Unsuppress and free extra memory if last item. */ if (listcount(pi->extra->aggr_suppressors) == 0) { + if (BGP_DEBUG(update, UPDATE_OUT)) + zlog_debug("aggregate-address unsuppressing: %pFX", + bgp_dest_get_prefix(pi->net)); + list_delete(&pi->extra->aggr_suppressors); bgp_path_info_set_flag(pi->net, pi, BGP_PATH_ATTR_CHANGED); return true; diff --git a/tests/topotests/bgp_aggregate_address_topo1/r1/bgpd.conf b/tests/topotests/bgp_aggregate_address_topo1/r1/bgpd.conf index 5fd6e8e83d..fa52150085 100644 --- a/tests/topotests/bgp_aggregate_address_topo1/r1/bgpd.conf +++ b/tests/topotests/bgp_aggregate_address_topo1/r1/bgpd.conf @@ -1,3 +1,5 @@ +debug bgp updates +! access-list acl-sup-one seq 5 permit 192.168.2.1/32 access-list acl-sup-one seq 10 deny any !