MPLS disposition actions at the tail of unicast LSPs
[vpp.git] / src / vnet / fib / fib_path_ext.c
index 26f2b9b..a285ba0 100644 (file)
@@ -191,6 +191,9 @@ fib_path_ext_stack (fib_path_ext_t *path_ext,
     case FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS:
         parent_fct = child_fct;
        break;
+    case FIB_FORW_CHAIN_TYPE_ETHERNET:
+        parent_fct = FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS;
+       break;
     default:
         return (nhs);
        break;
@@ -252,6 +255,15 @@ fib_path_ext_stack (fib_path_ext_t *path_ext,
                     chain_proto,
                     mldi);
        }
+        else if (child_fct == FIB_FORW_CHAIN_TYPE_MPLS_EOS)
+        {
+            /*
+             * MPLS EOS packets using an imp-null. Insert the disposition.
+             */
+            fib_path_stack_mpls_disp(nh->path_index,
+                                     fib_forw_chain_type_to_dpo_proto(parent_fct),
+                                     &nh->path_dpo);
+        }
     }
     dpo_reset(&via_dpo);