aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2020-04-27 11:36:22 +0200
committerAlberto Compagno <acompagn+fdio@cisco.com>2020-04-27 11:36:22 +0200
commit2e68bf4cbd4b3cdd40274a40ff03aee5909a412a (patch)
tree8cac5878111a6c9576ef1139b6bb28abc2c7dc64
parent509e9201fd1918caf8fb08160064e7dbeef24dee (diff)
[HICN-604] Added missing punting for udp faces
Every time a udp face is created, a punting on the source port of the face is added Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com> Change-Id: I2b6205cdeb0ef8f527e2ce9a2046c345275b3bca
-rw-r--r--hicn-plugin/src/faces/udp/face_udp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/hicn-plugin/src/faces/udp/face_udp.c b/hicn-plugin/src/faces/udp/face_udp.c
index e610cbd14..8abd2a047 100644
--- a/hicn-plugin/src/faces/udp/face_udp.c
+++ b/hicn-plugin/src/faces/udp/face_udp.c
@@ -15,9 +15,11 @@
#include <vlib/vlib.h>
#include <vnet/vnet.h>
+#include <vnet/udp/udp.h>
#include "face_udp.h"
#include "face_udp_node.h"
+#include "iface_udp_node.h"
#include "dpo_udp.h"
#include "../face.h"
#include "../../infra.h"
@@ -129,7 +131,7 @@ hicn_face_udp_add (const ip46_address_t * local_addr,
hicn_face_flags_t flags = (hicn_face_flags_t) 0;
flags |= HICN_FACE_FLAGS_FACE;
-
+ vlib_main_t * vm = vlib_get_main();
if (ip46_address_is_ip4 (local_addr) && ip46_address_is_ip4 (remote_addr))
{
@@ -193,6 +195,8 @@ hicn_face_udp_add (const ip46_address_t * local_addr,
*pfaceid = hicn_dpoi_get_index (face);
dpo_proto = DPO_PROTO_IP4;
fib_table_unlock (fib_index, fib_pfx.fp_proto, FIB_SOURCE_PRIORITY_HI);
+
+ udp_register_dst_port(vm, local_port, hicn_iface_udp4_input_node.index, 1);
}
else if (!ip46_address_is_ip4 (local_addr)
&& !ip46_address_is_ip4 (remote_addr))
@@ -248,6 +252,8 @@ hicn_face_udp_add (const ip46_address_t * local_addr,
*pfaceid = hicn_dpoi_get_index (face);
dpo_proto = DPO_PROTO_IP6;
fib_table_unlock (fib_index, fib_pfx.fp_proto, FIB_SOURCE_PRIORITY_HI);
+
+ udp_register_dst_port(vm, local_port, hicn_iface_udp6_input_node.index, 0);
}
else
{
@@ -283,6 +289,7 @@ hicn_face_udp_add (const ip46_address_t * local_addr,
//Take a lock on the face which will be removed when the face is deleted
hicn_face_lock (&(retx->dpo));
+
return ret;
}