summaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2019-06-04 13:16:42 +0200
committerDave Barach <openvpp@barachs.net>2019-06-04 15:54:56 +0000
commitdf3ca23f17820389fc625bbc0e7f468fce550aa9 (patch)
treedcafe44b9cb710664566d14d8e21ffb87caa32a5 /src/vnet/vxlan
parent5f08ab6493e1420d84c03d0b62431ac3a6de4ce9 (diff)
features will register udp ports once configured
plugins: - ipfixcollector vnet: - geneve - vxlan_gpe - vxlan Change-Id: I69a8b4017ee6990f2b4874fe3e94c4520bde7101 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'src/vnet/vxlan')
-rw-r--r--src/vnet/vxlan/vxlan.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/vnet/vxlan/vxlan.c b/src/vnet/vxlan/vxlan.c
index ff796ec0673..52d0812235f 100644
--- a/src/vnet/vxlan/vxlan.c
+++ b/src/vnet/vxlan/vxlan.c
@@ -639,6 +639,17 @@ int vnet_vxlan_add_del_tunnel
if (sw_if_indexp)
*sw_if_indexp = sw_if_index;
+ if (a->is_add)
+ {
+ /* register udp ports */
+ if (!is_ip6 && !udp_is_valid_dst_port (UDP_DST_PORT_vxlan, 1))
+ udp_register_dst_port (vxm->vlib_main, UDP_DST_PORT_vxlan,
+ vxlan4_input_node.index, 1);
+ if (is_ip6 && !udp_is_valid_dst_port (UDP_DST_PORT_vxlan6, 0))
+ udp_register_dst_port (vxm->vlib_main, UDP_DST_PORT_vxlan6,
+ vxlan6_input_node.index, 0);
+ }
+
return 0;
}
@@ -1255,11 +1266,6 @@ vxlan_init (vlib_main_t * vm)
sizeof (ip46_address_t),
sizeof (mcast_shared_t));
- udp_register_dst_port (vm, UDP_DST_PORT_vxlan,
- vxlan4_input_node.index, /* is_ip4 */ 1);
- udp_register_dst_port (vm, UDP_DST_PORT_vxlan6,
- vxlan6_input_node.index, /* is_ip4 */ 0);
-
fib_node_register_type (FIB_NODE_TYPE_VXLAN_TUNNEL, &vxlan_vft);
return 0;