Change ethernet's result within unformat_decap_next
[vpp.git] / vnet / vnet / nsh-vxlan-gpe / nsh_vxlan_gpe.c
index 1b46fa9..3aab224 100644 (file)
@@ -218,7 +218,7 @@ static int nsh_vxlan_gpe_rewrite (nsh_vxlan_gpe_tunnel_t * t)
 
   /* Copy any TLVs */
   if (vec_len(t->tlvs))
-    memcpy (nsh0->tlvs, t->tlvs, 4*vec_len(t->tlvs));
+    clib_memcpy (nsh0->tlvs, t->tlvs, 4*vec_len(t->tlvs));
 
   t->rewrite = rw;
   return (0);
@@ -271,7 +271,7 @@ int vnet_nsh_vxlan_gpe_add_del_tunnel
         }
 
       key_copy = clib_mem_alloc (sizeof (*key_copy));
-      memcpy (key_copy, &key, sizeof (*key_copy));
+      clib_memcpy (key_copy, &key, sizeof (*key_copy));
 
       hash_set_mem (ngm->nsh_vxlan_gpe_tunnel_by_key, key_copy, 
                     t - ngm->tunnels);
@@ -351,7 +351,7 @@ static uword unformat_decap_next (unformat_input_t * input, va_list * args)
   else if (unformat (input, "ip6"))
     *result = NSH_VXLAN_GPE_INPUT_NEXT_IP6_INPUT;
   else if (unformat (input, "ethernet"))
-    *result = NSH_VXLAN_GPE_INPUT_NEXT_IP6_INPUT;
+    *result = NSH_VXLAN_GPE_INPUT_NEXT_ETHERNET_INPUT;
   else if (unformat (input, "nsh-vxlan-gpe"))
     *result = NSH_VXLAN_GPE_INPUT_NEXT_NSH_VXLAN_GPE_ENCAP;
   else if (unformat (input, "%d", &tmp))
@@ -516,7 +516,7 @@ VLIB_CLI_COMMAND (create_nsh_vxlan_gpe_tunnel_command, static) = {
   "    c1 <nn> c2 <nn> c3 <nn> c4 <nn> spi <nn> si <nn> vni <nn>\n"
   "    [encap-vrf-id <nn>] [decap-vrf-id <nn>] [o-bit <1|0>] [c-bit <1|0>]\n"
   "    [md-type <nn>][next-ip4][next-ip6][next-ethernet][next-nsh]\n"
-  "    [tlv <xx>][decap-next [ip4|ip6|ethernet|nsh-encap]][del]\n",
+  "    [tlv <xx>][decap-next [ip4|ip6|ethernet|nsh-vxlan-gpe]][del]\n",
   .function = nsh_vxlan_gpe_add_del_tunnel_command_fn,
 };