summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}