summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@opensourcerouting.org>2020-10-21 21:48:43 -0300
committerRafael Zalamena <rzalamena@opensourcerouting.org>2020-10-22 13:52:06 -0300
commit6ba6de7e172afdbbd82cb2a3eb1f6b091900d1ea (patch)
tree54294424ca3a9cee45b17563cef1e7a158d62319
parent4056a5f6a582ec5b3c44b3e2a6275845f5a859d1 (diff)
bgpd,topotests: log route suppression messages
To see the messages activate the BGP debug: `debug bgp updates`. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
-rw-r--r--bgpd/bgp_route.c8
-rw-r--r--tests/topotests/bgp_aggregate_address_topo1/r1/bgpd.conf2
2 files changed, 10 insertions, 0 deletions
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
!