aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/mpls
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-05-24 09:37:49 -0700
committerChris Luke <chris_luke@comcast.com>2017-05-24 17:42:29 +0000
commit4f4599d487df60cfc90506a15ba46a4aecb68137 (patch)
treec039928666e605766f73ca3bbf88dd20fe3a662e /src/vnet/mpls
parent13eaf3e61decdb60bfff1741429cf05129e3cf38 (diff)
MPLS trace fixes
Change-Id: I141a14e1098e562bdb3c3ac576754f4f19dbcb04 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/mpls')
-rw-r--r--src/vnet/mpls/mpls_lookup.c2
-rw-r--r--src/vnet/mpls/mpls_output.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/vnet/mpls/mpls_lookup.c b/src/vnet/mpls/mpls_lookup.c
index 4b8a3eef13b..322e0db0733 100644
--- a/src/vnet/mpls/mpls_lookup.c
+++ b/src/vnet/mpls/mpls_lookup.c
@@ -47,7 +47,7 @@ format_mpls_lookup_trace (u8 * s, va_list * args)
CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
mpls_lookup_trace_t * t = va_arg (*args, mpls_lookup_trace_t *);
- s = format (s, "MPLS: next [%d], lookup fib index %d, LB index %d hash %#x "
+ s = format (s, "MPLS: next [%d], lookup fib index %d, LB index %d hash %x "
"label %d eos %d",
t->next_index, t->lfib_index, t->lb_index, t->hash,
vnet_mpls_uc_get_label(
diff --git a/src/vnet/mpls/mpls_output.c b/src/vnet/mpls/mpls_output.c
index d90dec21864..241a7835f2d 100644
--- a/src/vnet/mpls/mpls_output.c
+++ b/src/vnet/mpls/mpls_output.c
@@ -206,6 +206,9 @@ mpls_output_inline (vlib_main_t * vm,
p0, sizeof (*tr));
tr->adj_index = vnet_buffer(p0)->ip.adj_index[VLIB_TX];
tr->flow_hash = vnet_buffer(p0)->ip.flow_hash;
+ clib_memcpy (tr->packet_data,
+ vlib_buffer_get_current (p0),
+ sizeof (tr->packet_data));
}
if (PREDICT_FALSE(p1->flags & VLIB_BUFFER_IS_TRACED))
{
@@ -213,6 +216,9 @@ mpls_output_inline (vlib_main_t * vm,
p1, sizeof (*tr));
tr->adj_index = vnet_buffer(p1)->ip.adj_index[VLIB_TX];
tr->flow_hash = vnet_buffer(p1)->ip.flow_hash;
+ clib_memcpy (tr->packet_data,
+ vlib_buffer_get_current (p1),
+ sizeof (tr->packet_data));
}
vlib_validate_buffer_enqueue_x2 (vm, node, next_index,