/* 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);
nsh_vxlan_gpe_tunnel_key_t key, *key_copy;
hash_pair_t *hp;
- key.src = a->src.as_u32;
+ key.src = a->dst.as_u32; /* decap src in key is encap dst in config */
key.vni = clib_host_to_net_u32 (a->vni << 8);
key.spi_si = clib_host_to_net_u32(a->spi_si);
+ key.pad = 0;
p = hash_get_mem (ngm->nsh_vxlan_gpe_tunnel_by_key, &key);
}
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);
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))
.short_help =
"nsh vxlan tunnel src <ip4-addr> dst <ip4-addr>"
" c1 <nn> c2 <nn> c3 <nn> c4 <nn> spi <nn> si <nn> vni <nn>\n"
- " [encap-fib-id <nn>] [decap-fib-id <nn>] [o-bit <1|0>] [c-bit <1|0>]\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,
};