aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/adj
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/adj')
-rw-r--r--src/vnet/adj/adj.c12
-rw-r--r--src/vnet/adj/adj_glean.c6
2 files changed, 8 insertions, 10 deletions
diff --git a/src/vnet/adj/adj.c b/src/vnet/adj/adj.c
index 386070ed3f8..ed4bada6f24 100644
--- a/src/vnet/adj/adj.c
+++ b/src/vnet/adj/adj.c
@@ -132,13 +132,17 @@ format_ip_adjacency (u8 * s, va_list * args)
vlib_counter_t counts;
vlib_get_combined_counter(&adjacency_counters, adj_index, &counts);
- s = format (s, "\n counts:[%Ld:%Ld]", counts.packets, counts.bytes);
- s = format (s, "\n locks:%d", adj->ia_node.fn_locks);
+ s = format (s, "\n counts:[%Ld:%Ld]", counts.packets, counts.bytes);
+ s = format (s, "\n locks:%d", adj->ia_node.fn_locks);
s = format(s, "\n delegates:\n ");
adj_delegate_format(s, adj);
- s = format(s, "\n children:\n ");
- s = fib_node_children_format(adj->ia_node.fn_children, s);
+ s = format(s, "\n children:");
+ if (fib_node_list_get_size(adj->ia_node.fn_children))
+ {
+ s = format(s, "\n ");
+ s = fib_node_children_format(adj->ia_node.fn_children, s);
+ }
}
return s;
diff --git a/src/vnet/adj/adj_glean.c b/src/vnet/adj/adj_glean.c
index 7de8e397737..41bc4c9f68d 100644
--- a/src/vnet/adj/adj_glean.c
+++ b/src/vnet/adj/adj_glean.c
@@ -262,16 +262,10 @@ format_adj_glean (u8* s, va_list *ap)
{
index_t index = va_arg(*ap, index_t);
CLIB_UNUSED(u32 indent) = va_arg(*ap, u32);
- vnet_main_t * vnm = vnet_get_main();
ip_adjacency_t * adj = adj_get(index);
s = format(s, "%U-glean: %U",
format_fib_protocol, adj->ia_nh_proto,
- format_vnet_sw_interface_name,
- vnm,
- vnet_get_sw_interface(vnm,
- adj->rewrite_header.sw_if_index));
- s = format (s, " %U",
format_vnet_rewrite,
&adj->rewrite_header, sizeof (adj->rewrite_data), 0);