diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/ioam/ipfixcollector/ipfixcollector.c | 8 | ||||
-rw-r--r-- | src/vnet/geneve/geneve.c | 16 | ||||
-rw-r--r-- | src/vnet/vxlan-gpe/vxlan_gpe.c | 16 | ||||
-rw-r--r-- | src/vnet/vxlan/vxlan.c | 16 |
4 files changed, 38 insertions, 18 deletions
diff --git a/src/plugins/ioam/ipfixcollector/ipfixcollector.c b/src/plugins/ioam/ipfixcollector/ipfixcollector.c index 71b934ecd93..4d6735f5971 100644 --- a/src/plugins/ioam/ipfixcollector/ipfixcollector.c +++ b/src/plugins/ioam/ipfixcollector/ipfixcollector.c @@ -73,6 +73,11 @@ ipfix_collector_reg_setid (vlib_main_t * vm, ipfix_client_add_del_t * info) client->set_id = info->ipfix_setid; hash_set (cm->client_reg_table, info->ipfix_setid, i); + + if (!udp_is_valid_dst_port (UDP_DST_PORT_ipfix, 1)) + udp_register_dst_port (vm, UDP_DST_PORT_ipfix, + ipfix_collector_node.index, 1); + return 0; } @@ -88,9 +93,6 @@ ipfix_collector_init (vlib_main_t * vm) cm->client_reg_pool = NULL; cm->client_reg_table = hash_create (0, sizeof (uword)); - udp_register_dst_port (vm, - UDP_DST_PORT_ipfix, - ipfix_collector_node.index, 1 /* is_ip4 */ ); return error; } diff --git a/src/vnet/geneve/geneve.c b/src/vnet/geneve/geneve.c index fe35c6c2429..8b773c1e009 100644 --- a/src/vnet/geneve/geneve.c +++ b/src/vnet/geneve/geneve.c @@ -623,6 +623,17 @@ int vnet_geneve_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_geneve, 1)) + udp_register_dst_port (vxm->vlib_main, UDP_DST_PORT_geneve, + geneve4_input_node.index, 1); + if (is_ip6 && !udp_is_valid_dst_port (UDP_DST_PORT_geneve6, 0)) + udp_register_dst_port (vxm->vlib_main, UDP_DST_PORT_geneve6, + geneve6_input_node.index, 0); + } + return 0; } @@ -1115,11 +1126,6 @@ geneve_init (vlib_main_t * vm) sizeof (ip46_address_t), sizeof (mcast_shared_t)); - udp_register_dst_port (vm, UDP_DST_PORT_geneve, - geneve4_input_node.index, /* is_ip4 */ 1); - udp_register_dst_port (vm, UDP_DST_PORT_geneve6, - geneve6_input_node.index, /* is_ip4 */ 0); - fib_node_register_type (FIB_NODE_TYPE_GENEVE_TUNNEL, &geneve_vft); return 0; 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); 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; |