summaryrefslogtreecommitdiff
path: root/bgpd
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_route.c10
-rw-r--r--bgpd/bgp_routemap.c34
2 files changed, 28 insertions, 16 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index c4ab223b7f..1d1f3d9b26 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -11262,8 +11262,13 @@ static int bgp_show_route_in_table(struct vty *vty, struct bgp *bgp,
vty,
use_json,
json_paths);
- if (use_json && display)
- json_object_object_add(json, "paths", json_paths);
+ if (use_json) {
+ if (display)
+ json_object_object_add(json, "paths",
+ json_paths);
+ else
+ json_object_free(json_paths);
+ }
} else {
if ((dest = bgp_node_match(rib, &match)) != NULL) {
const struct prefix *dest_p = bgp_dest_get_prefix(dest);
@@ -12742,6 +12747,7 @@ static int bgp_peer_counts(struct vty *vty, struct peer *peer, afi_t afi,
"No such neighbor or address family");
vty_out(vty, "%s\n", json_object_to_json_string(json));
json_object_free(json);
+ json_object_free(json_loop);
} else
vty_out(vty, "%% No such neighbor or address family\n");
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index ceaf8c0963..32af9ed027 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -3531,8 +3531,9 @@ static void bgp_route_map_process_peer(const char *rmap_name,
PEER_FLAG_SOFT_RECONFIG)) {
if (bgp_debug_update(peer, NULL, NULL, 1))
zlog_debug(
- "Processing route_map %s update on peer %s (inbound, soft-reconfig)",
- rmap_name, peer->host);
+ "Processing route_map %s(%s:%s) update on peer %s (inbound, soft-reconfig)",
+ rmap_name, afi2str(afi),
+ safi2str(safi), peer->host);
bgp_soft_reconfig_in(peer, afi, safi);
} else if (CHECK_FLAG(peer->cap,
@@ -3541,8 +3542,9 @@ static void bgp_route_map_process_peer(const char *rmap_name,
PEER_CAP_REFRESH_NEW_RCV)) {
if (bgp_debug_update(peer, NULL, NULL, 1))
zlog_debug(
- "Processing route_map %s update on peer %s (inbound, route-refresh)",
- rmap_name, peer->host);
+ "Processing route_map %s(%s:%s) update on peer %s (inbound, route-refresh)",
+ rmap_name, afi2str(afi),
+ safi2str(safi), peer->host);
bgp_route_refresh_send(
peer, afi, safi, 0, 0, 0,
BGP_ROUTE_REFRESH_NORMAL);
@@ -3681,8 +3683,9 @@ static void bgp_route_map_process_update(struct bgp *bgp, const char *rmap_name,
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug(
- "Processing route_map %s update on table map",
- rmap_name);
+ "Processing route_map %s(%s:%s) update on table map",
+ rmap_name, afi2str(afi),
+ safi2str(safi));
if (route_update)
bgp_zebra_announce_table(bgp, afi, safi);
}
@@ -3709,8 +3712,9 @@ static void bgp_route_map_process_update(struct bgp *bgp, const char *rmap_name,
if (bgp_debug_zebra(bn_p))
zlog_debug(
- "Processing route_map %s update on static route %s",
- rmap_name,
+ "Processing route_map %s(%s:%s) update on static route %s",
+ rmap_name, afi2str(afi),
+ safi2str(safi),
inet_ntop(bn_p->family,
&bn_p->u.prefix, buf,
INET6_ADDRSTRLEN));
@@ -3760,8 +3764,9 @@ static void bgp_route_map_process_update(struct bgp *bgp, const char *rmap_name,
if (bgp_debug_zebra(bn_p))
zlog_debug(
- "Processing route_map %s update on aggregate-address route %s",
- rmap_name,
+ "Processing route_map %s(%s:%s) update on aggregate-address route %s",
+ rmap_name, afi2str(afi),
+ safi2str(safi),
inet_ntop(bn_p->family,
&bn_p->u.prefix, buf,
INET6_ADDRSTRLEN));
@@ -3796,8 +3801,9 @@ static void bgp_route_map_process_update(struct bgp *bgp, const char *rmap_name,
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug(
- "Processing route_map %s update on redistributed routes",
- rmap_name);
+ "Processing route_map %s(%s:%s) update on redistributed routes",
+ rmap_name, afi2str(afi),
+ safi2str(safi));
bgp_redistribute_resend(bgp, afi, i,
red->instance);
@@ -3816,8 +3822,8 @@ static void bgp_route_map_process_update(struct bgp *bgp, const char *rmap_name,
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug(
- "Processing route_map %s update on advertise type5 route command",
- rmap_name);
+ "Processing route_map %s(%s:%s) update on advertise type5 route command",
+ rmap_name, afi2str(afi), safi2str(safi));
if (route_update && advertise_type5_routes(bgp, afi)) {
bgp_evpn_withdraw_type5_routes(bgp, afi, safi);