diff options
Diffstat (limited to 'src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c')
-rw-r--r-- | src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c b/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c index 108b0c0765b..327afc3fb61 100644 --- a/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c +++ b/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c @@ -19,6 +19,7 @@ #include <vnet/dpo/load_balance.h> #include <vnet/fib/ip4_fib.h> #include <vnet/fib/fib_entry.h> +#include <vnet/udp/udp_local.h> vxlan_gpe_ioam_main_t vxlan_gpe_ioam_main; @@ -478,7 +479,7 @@ vxlan_gpe_set_ioam_rewrite_command_fn (vlib_main_t * key4.local = local.ip4.as_u32; key4.remote = remote.ip4.as_u32; key4.vni = clib_host_to_net_u32 (vni << 8); - key4.pad = 0; + key4.port = clib_host_to_net_u16 (UDP_DST_PORT_VXLAN_GPE); p = hash_get_mem (gm->vxlan4_gpe_tunnel_by_key, &key4); } else @@ -488,6 +489,7 @@ vxlan_gpe_set_ioam_rewrite_command_fn (vlib_main_t * key6.remote.as_u64[0] = remote.ip6.as_u64[0]; key6.remote.as_u64[1] = remote.ip6.as_u64[1]; key6.vni = clib_host_to_net_u32 (vni << 8); + key6.port = clib_host_to_net_u16 (UDP_DST_PORT_VXLAN6_GPE); p = hash_get_mem (gm->vxlan6_gpe_tunnel_by_key, &key6); } @@ -508,13 +510,11 @@ vxlan_gpe_set_ioam_rewrite_command_fn (vlib_main_t * } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vxlan_gpe_set_ioam_rewrite_cmd, static) = { .path = "set vxlan-gpe-ioam", .short_help = "set vxlan-gpe-ioam vxlan <src-ip> <dst_ip> <vnid> [disable]", .function = vxlan_gpe_set_ioam_rewrite_command_fn, }; -/* *INDENT-ON* */ @@ -590,13 +590,11 @@ vxlan_gpe_set_ioam_flags_command_fn (vlib_main_t * vm, return rv; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vxlan_gpe_set_ioam_flags_cmd, static) = { .path = "set vxlan-gpe-ioam rewrite", .short_help = "set vxlan-gpe-ioam [trace] [pot] [ppc <encap|decap>]", .function = vxlan_gpe_set_ioam_flags_command_fn,}; -/* *INDENT-ON* */ int vxlan_gpe_ioam_disable_for_dest @@ -681,13 +679,11 @@ static clib_error_t *vxlan_gpe_set_ioam_transit_rewrite_command_fn return rv; } - /* *INDENT-OFF* */ VLIB_CLI_COMMAND (vxlan_gpe_set_ioam_transit_rewrite_cmd, static) = { .path = "set vxlan-gpe-ioam-transit", .short_help = "set vxlan-gpe-ioam-transit dst-ip <dst_ip> [outer-fib-index <outer_fib_index>] [disable]", .function = vxlan_gpe_set_ioam_transit_rewrite_command_fn, }; -/* *INDENT-ON* */ clib_error_t *clear_vxlan_gpe_ioam_rewrite_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) @@ -695,14 +691,12 @@ clib_error_t *clear_vxlan_gpe_ioam_rewrite_command_fn return (vxlan_gpe_ioam_disable (0, 0, 0)); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vxlan_gpe_clear_ioam_flags_cmd, static) = { .path = "clear vxlan-gpe-ioam rewrite", .short_help = "clear vxlan-gpe-ioam rewrite", .function = clear_vxlan_gpe_ioam_rewrite_command_fn, }; -/* *INDENT-ON* */ /** @@ -749,7 +743,8 @@ void vxlan_gpe_ioam_interface_init (void) { vxlan_gpe_ioam_main_t *hm = &vxlan_gpe_ioam_main; - hm->fib_entry_type = fib_node_register_new_type (&vxlan_gpe_ioam_vft); + hm->fib_entry_type = + fib_node_register_new_type ("vxlan-gpe", &vxlan_gpe_ioam_vft); return; } |