summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/interface_output.c')
-rw-r--r--src/vnet/interface_output.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vnet/interface_output.c b/src/vnet/interface_output.c
index 34f0a977131..ba69d36b6c4 100644
--- a/src/vnet/interface_output.c
+++ b/src/vnet/interface_output.c
@@ -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 = ip4_tcp_udp_compute_checksum (vm, b, ip4);
+ {
+ 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);
}