Fix TCP checksum.
Set TCP checksum to zero, before calculate the TCP checksum.
@@ -181,7 +181,10 @@ calc_checksums (vlib_main_t * vm, vlib_buffer_t * b)
if (b->flags & VNET_BUFFER_F_OFFLOAD_IP_CKSUM)
ip4->checksum = ip4_header_checksum (ip4);
if (b->flags & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM)
+ {
+ th->checksum = 0;
th->checksum = ip4_tcp_udp_compute_checksum (vm, b, ip4);
+ }
if (b->flags & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM)
uh->checksum = ip4_tcp_udp_compute_checksum (vm, b, ip4);
}
