From owner-freebsd-hackers Thu Sep 20 20:40:15 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ipperformance.com (ipperf.com [206.225.36.162]) by hub.freebsd.org (Postfix) with ESMTP id 8291337B41F for ; Thu, 20 Sep 2001 20:40:09 -0700 (PDT) Received: from ipperformance.com (cs6668163-239.austin.rr.com [66.68.163.239]) by ipperformance.com (8.9.3/8.9.3) with SMTP id WAA12218; Thu, 20 Sep 2001 22:39:41 -0500 (CDT) (envelope-from matt@ipperformance.com) Message-ID: <3BAAB547.C065FF97@ipperformance.com> Date: Thu, 20 Sep 2001 22:34:31 -0500 From: Matt Finlay X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Les Biffle Cc: davep@afterswish.com, Alfred Perlstein , hackers@FreeBSD.ORG Subject: Re: sendto not sending what I asked... References: <200109210250.f8L2oO615274@ns3.safety.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Les Biffle wrote: > > pkt.ipbit.ip_sum=in_cksum((unsigned short*)(void*)&pkt,20); > > pkt.tcpbit.th_sum=tcpsum(&pkt.ipbit); > > You need to do the TCP checksum first. It changes the payload (the TCP > checksum). The IP checksum includes all data, so must be done after the > payload changes are done. i think this is incorrect. the IP checksum only includes the IP header and any IP options. therefore order should not matter. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message