From 2e68bf4cbd4b3cdd40274a40ff03aee5909a412a Mon Sep 17 00:00:00 2001 From: Alberto Compagno Date: Mon, 27 Apr 2020 11:36:22 +0200 Subject: [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 Change-Id: I2b6205cdeb0ef8f527e2ce9a2046c345275b3bca --- hicn-plugin/src/faces/udp/face_udp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 #include +#include #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; } -- cgit 1.2.3-korg