summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/mpls/mpls_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'vnet/vnet/mpls/mpls_output.c')
-rw-r--r--vnet/vnet/mpls/mpls_output.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/vnet/vnet/mpls/mpls_output.c b/vnet/vnet/mpls/mpls_output.c
index 299e1dd242a..1d5d18224e3 100644
--- a/vnet/vnet/mpls/mpls_output.c
+++ b/vnet/vnet/mpls/mpls_output.c
@@ -52,7 +52,8 @@ format_mpls_output_trace (u8 * s, va_list * args)
static inline uword
mpls_output_inline (vlib_main_t * vm,
vlib_node_runtime_t * node,
- vlib_frame_t * from_frame)
+ vlib_frame_t * from_frame,
+ int is_midchain)
{
u32 n_left_from, next_index, * from, * to_next, cpu_index;
vlib_node_runtime_t * error_node;
@@ -121,6 +122,11 @@ mpls_output_inline (vlib_main_t * vm,
vnet_buffer (p0)->sw_if_index[VLIB_TX] =
adj0[0].rewrite_header.sw_if_index;
next0 = adj0[0].rewrite_header.next_index;
+
+ if (is_midchain)
+ {
+ adj0->sub_type.midchain.fixup_func(vm, adj0, p0);
+ }
}
else
{
@@ -165,7 +171,7 @@ mpls_output (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * from_frame)
{
- return (mpls_output_inline(vm, node, from_frame));
+ return (mpls_output_inline(vm, node, from_frame, /* is_midchain */ 0));
}
VLIB_REGISTER_NODE (mpls_output_node) = {
@@ -193,11 +199,11 @@ mpls_midchain (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * from_frame)
{
- return (mpls_output_inline(vm, node, from_frame));
+ return (mpls_output_inline(vm, node, from_frame, /* is_midchain */ 1));
}
VLIB_REGISTER_NODE (mpls_midchain_node) = {
- .function = mpls_output,
+ .function = mpls_midchain,
.name = "mpls-midchain",
.vector_size = sizeof (u32),