aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip4_to_ip6.h
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2017-06-08 05:24:28 -0700
committerOle Trøan <otroan@employees.org>2017-06-09 07:30:14 +0000
commit732036d677b84aa8eaea45f8059783e827622b77 (patch)
treebac6a6fccc1ae8500d5d3f54dbede362d0402459 /src/vnet/ip/ip4_to_ip6.h
parentef2a5bf0a31c9c0a94f9f497cb6353f46073e6ec (diff)
NAT64: ICMP error support
Added ICMP error messages translation. Added check for multi thread (not supported yet, so init failed). Added API definition for custom NAT64 refix. Change-Id: Ice2f04631af63e594aecc09087a1cf59f3b676fb Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip4_to_ip6.h')
-rw-r--r--src/vnet/ip/ip4_to_ip6.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/vnet/ip/ip4_to_ip6.h b/src/vnet/ip/ip4_to_ip6.h
index 96b8bf1e676..965d27c3393 100644
--- a/src/vnet/ip/ip4_to_ip6.h
+++ b/src/vnet/ip/ip4_to_ip6.h
@@ -310,14 +310,11 @@ icmp_to_icmp6 (vlib_buffer_t * p, ip4_to_ip6_set_fn_t fn, void *ctx,
else if (PREDICT_TRUE (inner_ip4->protocol == IP_PROTOCOL_UDP))
{
inner_L4_checksum = &((udp_header_t *) (inner_ip4 + 1))->checksum;
- if (!*inner_L4_checksum)
- {
- return -1;
- }
- *inner_L4_checksum =
- ip_csum_fold (ip_csum_sub_even
- (*inner_L4_checksum,
- *((u64 *) (&inner_ip4->src_address))));
+ if (*inner_L4_checksum)
+ *inner_L4_checksum =
+ ip_csum_fold (ip_csum_sub_even
+ (*inner_L4_checksum,
+ *((u64 *) (&inner_ip4->src_address))));
}
else if (inner_ip4->protocol == IP_PROTOCOL_ICMP)
{