From owner-freebsd-hackers Thu Sep 20 19:50:30 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ns3.safety.net (ns3.safety.net [216.40.201.32]) by hub.freebsd.org (Postfix) with ESMTP id 8A64A37B405 for ; Thu, 20 Sep 2001 19:50:26 -0700 (PDT) Received: (from les@localhost) by ns3.safety.net (8.10.2/8.10.2) id f8L2oO615274; Thu, 20 Sep 2001 21:50:24 -0500 From: Les Biffle Message-Id: <200109210250.f8L2oO615274@ns3.safety.net> Subject: Re: sendto not sending what I asked... In-Reply-To: <01092111231604.36513@development.wgtn.csg.co.nz> To: davep@afterswish.com Date: Thu, 20 Sep 2001 21:50:23 -0500 (CDT) Cc: Alfred Perlstein , hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL94 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII 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 > 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. -Les -- Les Biffle (480) 585-4099 les@safety.net http://www.les.safety.net/ Network Safety Corp., 5831 E. Dynamite Blvd., Cave Creek, AZ 85331 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message