aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/faces/face.h
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2023-01-30 21:14:39 +0000
committerMauro Sardara <msardara@cisco.com>2023-02-13 09:26:06 +0000
commitc46b82460987912eb465187892286922aeaedab4 (patch)
tree340369094db2fcc8023668f924d8e561547714bb /hicn-plugin/src/faces/face.h
parentdf902fa5ea07a0de312b1b6dd138e360611e5769 (diff)
feat(hicn-plugin): handle case of no exact match for mapme IU
Ticket: HICN-844 Change-Id: I1f046e6327e4cf507b7fa7a5adae53e63ab491bf Signed-off-by: Mauro Sardara <msardara@cisco.com> (cherry picked from commit 7cfd91a6c6316fe15186c8cd3acc1c4526db7e25)
Diffstat (limited to 'hicn-plugin/src/faces/face.h')
-rw-r--r--hicn-plugin/src/faces/face.h12
1 files changed, 10 insertions, 2 deletions
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);