aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/faces/udp/iface_udp_node.c
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-06-06 19:42:12 +0200
committerAlberto Compagno <acompagn+fdio@cisco.com>2019-06-06 23:02:14 +0200
commit27712b5f2a06c935a97643d91f6bd1345d05ec3b (patch)
treebd9dc4ee89daea07722db9376be4a5ef63b9ddf6 /hicn-plugin/src/faces/udp/iface_udp_node.c
parent2d555daf9034459ec5ef20f7d63cccd25c6c4b0c (diff)
[HICN-214] Updating next_node in the face that mapme add to the fib in order to forward interests
Change-Id: I97c408c9e910df0ea7c43c0341c0025521ced125 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/faces/udp/iface_udp_node.c')
-rw-r--r--hicn-plugin/src/faces/udp/iface_udp_node.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/hicn-plugin/src/faces/udp/iface_udp_node.c b/hicn-plugin/src/faces/udp/iface_udp_node.c
index 738aad829..1fdd68f0b 100644
--- a/hicn-plugin/src/faces/udp/iface_udp_node.c
+++ b/hicn-plugin/src/faces/udp/iface_udp_node.c
@@ -39,13 +39,11 @@ hicn_iface_udp_init (vlib_main_t * vm)
{
data_fwd_face_udp4_vlib_edge = vlib_node_add_next (vm,
hicn_data_fwd_node.index,
- hicn_iface_udp4_output_node.
- index);
+ hicn_iface_udp4_output_node.index);
data_fwd_face_udp6_vlib_edge = vlib_node_add_next (vm,
hicn_data_fwd_node.index,
- hicn_iface_udp6_output_node.
- index);
+ hicn_iface_udp6_output_node.index);
u32 temp_index4 = vlib_node_add_next (vm,
hicn_interest_hitcs_node.index,
@@ -173,8 +171,8 @@ typedef enum
\
inner_ip_hdr = (u8 *)(udp_hdr + 1); \
u8 is_v6 = hicn_is_v6((hicn_header_t *)inner_ip_hdr); \
- u8 is_icmp = is_v6*(inner_ip_hdr[7] == IPPROTO_ICMPV6) + \
- (1 - is_v6)*(inner_ip_hdr[10] == IPPROTO_ICMPV4); \
+ u8 is_icmp = is_v6*(inner_ip_hdr[6] == IPPROTO_ICMPV6) + \
+ (1 - is_v6)*(inner_ip_hdr[9] == IPPROTO_ICMPV4); \
\
next0 = is_icmp*NEXT_MAPME_UDP##ipv + \
(1-is_icmp)*NEXT_INTEREST_UDP##ipv; \
@@ -267,10 +265,10 @@ typedef enum
inner_ip_hdr1 = (u8 *)(udp_hdr1 + 1); \
u8 is_v6_0 = hicn_is_v6((hicn_header_t *)inner_ip_hdr0); \
u8 is_v6_1 = hicn_is_v6((hicn_header_t *)inner_ip_hdr1); \
- u8 is_icmp0 = is_v6_0*(inner_ip_hdr0[7] == IPPROTO_ICMPV6) + \
- (1 - is_v6_0)*(inner_ip_hdr0[10] == IPPROTO_ICMPV4); \
- u8 is_icmp1 = is_v6_1*(inner_ip_hdr1[7] == IPPROTO_ICMPV6) + \
- (1 - is_v6_1)*(inner_ip_hdr1[10] == IPPROTO_ICMPV4); \
+ u8 is_icmp0 = is_v6_0*(inner_ip_hdr0[6] == IPPROTO_ICMPV6) + \
+ (1 - is_v6_0)*(inner_ip_hdr0[9] == IPPROTO_ICMPV4); \
+ u8 is_icmp1 = is_v6_1*(inner_ip_hdr1[6] == IPPROTO_ICMPV6) + \
+ (1 - is_v6_1)*(inner_ip_hdr1[9] == IPPROTO_ICMPV4); \
\
next0 = is_icmp0*NEXT_MAPME_UDP##ipv + \
(1-is_icmp0)*NEXT_INTEREST_UDP##ipv; \