summaryrefslogtreecommitdiffstats
path: root/src/plugins/ioam/lib-vxlan-gpe
diff options
context:
space:
mode:
authorArtem Glazychev <artem.glazychev@xored.com>2021-05-28 19:09:14 +0700
committerDamjan Marion <dmarion@me.com>2021-10-08 11:38:56 +0000
commitea96292985760b7fc3af54669e3eab35e7561a10 (patch)
tree05a0317fb9cb7460f86056e16d256e448147eeaa /src/plugins/ioam/lib-vxlan-gpe
parent3f59c639609be9768f592111e5f8a8a2c23db3ac (diff)
vxlan-gpe: add udp-port configuration support
similar behavior as here: 839dcc0fb7313638d9b8f52a9db81350dddfe461 Type: improvement Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> Change-Id: I1b0a8f8f3dab48839e27df7065cf5f786cf0b5e9
Diffstat (limited to 'src/plugins/ioam/lib-vxlan-gpe')
-rw-r--r--src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_api.c5
-rw-r--r--src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_api.c b/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_api.c
index 9f6d181f0b1..d61832d975a 100644
--- a/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_api.c
+++ b/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_api.c
@@ -27,6 +27,7 @@
#include <vlibmemory/api.h>
#include <vnet/format_fns.h>
#include <vnet/ip/ip_types_api.h>
+#include <vnet/udp/udp_local.h>
/* define message IDs */
#include <ioam/lib-vxlan-gpe/ioam_vxlan_gpe.api_enum.h>
@@ -92,7 +93,7 @@ static void vl_api_vxlan_gpe_ioam_vni_enable_t_handler
clib_memcpy (&key4.remote, &mp->remote.un.ip4, sizeof (key4.remote));
vni = clib_net_to_host_u32 (mp->vni);
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);
}
@@ -141,7 +142,7 @@ static void vl_api_vxlan_gpe_ioam_vni_disable_t_handler
clib_memcpy (&key4.remote, &mp->remote, sizeof (key4.remote));
vni = clib_net_to_host_u32 (mp->vni);
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);
}
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..59798dc7494 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);
}