summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/fib_entry_src.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-10-31 12:28:22 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2017-11-11 14:23:45 +0000
commit62fe07c8e30a6ac718fe65528592fe6964d753fa (patch)
tree21da6b42dbcc372d54c016f8e7cfaf9a0f6a2f70 /src/vnet/fib/fib_entry_src.c
parentbfe470c04a58bceed5ba1892dd97e1708b700685 (diff)
MPLS disposition actions at the tail of unicast LSPs
Change-Id: I8c42e26152f2ed1246f91b789887bfc923418bdf Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/fib/fib_entry_src.c')
-rw-r--r--src/vnet/fib/fib_entry_src.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/vnet/fib/fib_entry_src.c b/src/vnet/fib/fib_entry_src.c
index 667aa485f7c..214dafe9b8d 100644
--- a/src/vnet/fib/fib_entry_src.c
+++ b/src/vnet/fib/fib_entry_src.c
@@ -259,6 +259,23 @@ fib_entry_chain_type_fixup (const fib_entry_t *entry,
return (dfct);
}
+static dpo_proto_t
+fib_prefix_get_payload_proto (const fib_prefix_t *pfx)
+{
+ switch (pfx->fp_proto)
+ {
+ case FIB_PROTOCOL_IP4:
+ return (DPO_PROTO_IP4);
+ case FIB_PROTOCOL_IP6:
+ return (DPO_PROTO_IP6);
+ case FIB_PROTOCOL_MPLS:
+ return (pfx->fp_payload_proto);
+ }
+
+ ASSERT(0);
+ return (DPO_PROTO_IP4);
+}
+
static void
fib_entry_src_get_path_forwarding (fib_node_index_t path_index,
fib_entry_src_collect_forwarding_ctx_t *ctx)
@@ -313,7 +330,7 @@ fib_entry_src_get_path_forwarding (fib_node_index_t path_index,
ctx->fct),
&nh->path_dpo);
fib_path_stack_mpls_disp(path_index,
- ctx->fib_entry->fe_prefix.fp_payload_proto,
+ fib_prefix_get_payload_proto(&ctx->fib_entry->fe_prefix),
&nh->path_dpo);
break;