summaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan-gpe/vxlan_gpe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/vxlan-gpe/vxlan_gpe.c')
-rw-r--r--src/vnet/vxlan-gpe/vxlan_gpe.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/vnet/vxlan-gpe/vxlan_gpe.c b/src/vnet/vxlan-gpe/vxlan_gpe.c
index 89e7a3cbd0e..ca17c12a87b 100644
--- a/src/vnet/vxlan-gpe/vxlan_gpe.c
+++ b/src/vnet/vxlan-gpe/vxlan_gpe.c
@@ -743,6 +743,17 @@ int vnet_vxlan_gpe_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_GPE, 1))
+ udp_register_dst_port (ngm->vlib_main, UDP_DST_PORT_VXLAN_GPE,
+ vxlan4_gpe_input_node.index, 1 /* is_ip4 */ );
+ if (is_ip6 && !udp_is_valid_dst_port (UDP_DST_PORT_VXLAN6_GPE, 0))
+ udp_register_dst_port (ngm->vlib_main, UDP_DST_PORT_VXLAN6_GPE,
+ vxlan6_gpe_input_node.index, 0 /* is_ip4 */ );
+ }
+
return 0;
}
@@ -1253,11 +1264,6 @@ vxlan_gpe_init (vlib_main_t * vm)
sizeof (mcast_shared_t));
ngm->vtep6 = hash_create_mem (0, sizeof (ip6_address_t), sizeof (uword));
- udp_register_dst_port (vm, UDP_DST_PORT_VXLAN_GPE,
- vxlan4_gpe_input_node.index, 1 /* is_ip4 */ );
- udp_register_dst_port (vm, UDP_DST_PORT_VXLAN6_GPE,
- vxlan6_gpe_input_node.index, 0 /* is_ip4 */ );
-
/* Register the list of standard decap protocols supported */
vxlan_gpe_register_decap_protocol (VXLAN_GPE_PROTOCOL_IP4,
VXLAN_GPE_INPUT_NEXT_IP4_INPUT);