From c46b82460987912eb465187892286922aeaedab4 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Mon, 30 Jan 2023 21:14:39 +0000 Subject: feat(hicn-plugin): handle case of no exact match for mapme IU Ticket: HICN-844 Change-Id: I1f046e6327e4cf507b7fa7a5adae53e63ab491bf Signed-off-by: Mauro Sardara (cherry picked from commit 7cfd91a6c6316fe15186c8cd3acc1c4526db7e25) --- hicn-plugin/src/faces/face.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'hicn-plugin/src/faces/face.h') diff --git a/hicn-plugin/src/faces/face.h b/hicn-plugin/src/faces/face.h index 2c0a09a28..43900dd4e 100644 --- a/hicn-plugin/src/faces/face.h +++ b/hicn-plugin/src/faces/face.h @@ -574,7 +574,11 @@ hicn_face_ip4_add_and_lock (hicn_face_id_t *index, u8 *hicnb_flags, ip46_address_set_ip4 (&ip_address, nat_addr); hicn_face_id_t idx; - u8 face_flags = 0; + u8 face_flags = *hicnb_flags & HICN_BUFFER_FLAGS_FROM_UDP4_TUNNEL ? + HICN_FACE_FLAGS_UDP4 : + *hicnb_flags & HICN_BUFFER_FLAGS_FROM_UDP6_TUNNEL ? + HICN_FACE_FLAGS_UDP6 : + 0; hicn_iface_add (&ip_address, sw_if, &idx, adj_index, face_flags); @@ -670,7 +674,11 @@ hicn_face_ip6_add_and_lock (hicn_face_id_t *index, u8 *hicnb_flags, ip46_address_t ip_address = { 0 }; ip46_address_set_ip6 (&ip_address, nat_addr); hicn_face_id_t idx; - u8 face_flags = 0; + u8 face_flags = *hicnb_flags & HICN_BUFFER_FLAGS_FROM_UDP4_TUNNEL ? + HICN_FACE_FLAGS_UDP4 : + *hicnb_flags & HICN_BUFFER_FLAGS_FROM_UDP6_TUNNEL ? + HICN_FACE_FLAGS_UDP6 : + 0; hicn_iface_add ((const ip46_address_t *) nat_addr, sw_if, &idx, adj_index, face_flags); -- cgit 1.2.3-korg