From 8964cb8773ed772886c29a50e0194dedd2080111 Mon Sep 17 00:00:00 2001 From: fyodor Date: Fri, 15 Aug 2008 22:38:30 +0000 Subject: [PATCH] set the ip->ip_sum to 0 before computing the checksum of fragments. I'm not sure if this is necessary, but it is a useful sanity check at least. --- tcpip.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/tcpip.cc b/tcpip.cc index eed69d9ca..200fe3872 100644 --- a/tcpip.cc +++ b/tcpip.cc @@ -1332,6 +1332,7 @@ int send_frag_ip_packet(int sd, struct eth_nfo *eth, u8 *packet, if ((fragment-1) * mtu + fdatalen < datalen) ip->ip_off |= htons(IP_MF); #if HAVE_IP_IP_SUM + ip->ip_sum = 0; ip->ip_sum = in_cksum((unsigned short *)ip, headerlen); #endif if (fragment > 1) // copy data payload