aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakub Grajciar <Jakub.Grajciar@pantheon.tech>2017-11-07 14:39:10 +0100
committerFlorin Coras <florin.coras@gmail.com>2017-11-07 16:29:32 +0000
commit2eeeb4b1706150f69402dd8afc43856f801cd89a (patch)
treefaa2055dee42dfdabc4ff5627837a40bc2c9d67b /src
parent810086d8fd08445919ae03bf36161037e53a712a (diff)
vnet: ip4/6_local-> don't drop TCP/UCP marked for cksum calc fix
Change-Id: Id14826eefe43168747c8ba69b3b600441a7d4047 Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/vnet/ip/ip4_forward.c14
-rw-r--r--src/vnet/ip/ip6_forward.c12
2 files changed, 13 insertions, 13 deletions
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c
index 4c559d59df3..60a7fab3eb4 100755
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -1577,12 +1577,12 @@ ip4_local_inline (vlib_main_t * vm,
good_tcp_udp0 =
(p0->flags & VNET_BUFFER_F_L4_CHECKSUM_CORRECT
- && !(p0->flags & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM
- || p0->flags & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM)) != 0;
+ || (p0->flags & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM
+ || p0->flags & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM)) != 0;
good_tcp_udp1 = (p1->flags & VNET_BUFFER_F_L4_CHECKSUM_CORRECT
- && !(p1->flags & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM
- || p1->flags &
- VNET_BUFFER_F_OFFLOAD_UDP_CKSUM)) != 0;
+ || (p1->flags & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM
+ || p1->flags &
+ VNET_BUFFER_F_OFFLOAD_UDP_CKSUM)) != 0;
if (PREDICT_FALSE (ip4_local_do_l4_check (is_tcp_udp0, p0->flags)
|| ip4_local_do_l4_check (is_tcp_udp1,
@@ -1740,8 +1740,8 @@ ip4_local_inline (vlib_main_t * vm,
good_tcp_udp0 =
(p0->flags & VNET_BUFFER_F_L4_CHECKSUM_CORRECT
- && !(p0->flags & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM
- || p0->flags & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM)) != 0;
+ || (p0->flags & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM
+ || p0->flags & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM)) != 0;
if (PREDICT_FALSE (ip4_local_do_l4_check (is_tcp_udp0, p0->flags)))
{
diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c
index 7a8b5ed2d98..a14bf09742b 100644
--- a/src/vnet/ip/ip6_forward.c
+++ b/src/vnet/ip/ip6_forward.c
@@ -1342,12 +1342,12 @@ ip6_local_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
is_tcp_udp1 = ip6_next_proto_is_tcp_udp (p1, ip1, &udp_offset1);
good_l4_csum0 = (flags0 & VNET_BUFFER_F_L4_CHECKSUM_CORRECT
- && !(flags0 & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM
- || flags0 & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM))
+ || (flags0 & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM
+ || flags0 & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM))
!= 0;
good_l4_csum1 = (flags1 & VNET_BUFFER_F_L4_CHECKSUM_CORRECT
- && !(flags1 & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM
- || flags1 & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM))
+ || (flags1 & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM
+ || flags1 & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM))
!= 0;
len_diff0 = 0;
len_diff1 = 0;
@@ -1513,8 +1513,8 @@ ip6_local_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
flags0 = p0->flags;
is_tcp_udp0 = ip6_next_proto_is_tcp_udp (p0, ip0, &udp_offset0);
good_l4_csum0 = (flags0 & VNET_BUFFER_F_L4_CHECKSUM_CORRECT
- && !(flags0 & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM
- || flags0 & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM))
+ || (flags0 & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM
+ || flags0 & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM))
!= 0;
len_diff0 = 0;