udp: fix buffer trace
Type: fix
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
Change-Id: I774ca50582281cb3cc5e43417e74d178bf4909bd
diff --git a/src/vnet/udp/udp_input.c b/src/vnet/udp/udp_input.c
index 95595c3..296a874 100644
--- a/src/vnet/udp/udp_input.c
+++ b/src/vnet/udp/udp_input.c
@@ -317,14 +317,13 @@
}
done:
+ if (PREDICT_FALSE (node->flags & VLIB_NODE_FLAG_TRACE))
+ udp_trace_buffer (vm, node, b[0], s0, error0);
b += 1;
n_left_from -= 1;
udp_inc_err_counter (err_counters, error0, 1);
-
- if (PREDICT_FALSE (node->flags & VLIB_NODE_FLAG_TRACE))
- udp_trace_buffer (vm, node, b[0], s0, error0);
}
vlib_buffer_free (vm, first_buffer, frame->n_vectors);