aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/faces
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-plugin/src/faces')
-rw-r--r--hicn-plugin/src/faces/app/face_prod.c3
-rw-r--r--hicn-plugin/src/faces/face.h12
-rw-r--r--hicn-plugin/src/faces/face_flags.h3
3 files changed, 14 insertions, 4 deletions
diff --git a/hicn-plugin/src/faces/app/face_prod.c b/hicn-plugin/src/faces/app/face_prod.c
index 4b7a5a2f6..5d0fa727b 100644
--- a/hicn-plugin/src/faces/app/face_prod.c
+++ b/hicn-plugin/src/faces/app/face_prod.c
@@ -269,7 +269,8 @@ hicn_face_prod_add (fib_prefix_t *prefix, u32 sw_if, u32 *cs_reserved,
HICN_DEBUG ("Calling hicn enable for producer face");
hicn_face_id_t *vec_faces = NULL;
- hicn_route_enable (prefix, &vec_faces);
+ fib_node_index_t hicn_fib_node_index;
+ hicn_route_enable (prefix, &hicn_fib_node_index, &vec_faces);
if (vec_faces != NULL)
vec_free (vec_faces);
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);
diff --git a/hicn-plugin/src/faces/face_flags.h b/hicn-plugin/src/faces/face_flags.h
index 69598ab1d..880d3b558 100644
--- a/hicn-plugin/src/faces/face_flags.h
+++ b/hicn-plugin/src/faces/face_flags.h
@@ -26,7 +26,8 @@
_ (2, APPFACE_PROD, "face is producer face") \
_ (3, APPFACE_CONS, "face is consumer face") \
_ (4, DELETED, "face is deleted") \
- _ (5, UDP, "face is udp")
+ _ (5, UDP4, "face is udp4") \
+ _ (6, UDP6, "face is udp6")
enum
{