From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 23 08:30:18 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D876016A426 for ; Sun, 23 Oct 2005 08:30:18 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web35705.mail.mud.yahoo.com (web35705.mail.mud.yahoo.com [66.163.179.159]) by mx1.FreeBSD.org (Postfix) with SMTP id B9DB343D49 for ; Sun, 23 Oct 2005 08:30:15 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 18294 invoked by uid 60001); 23 Oct 2005 08:30:15 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=4Wt2Ab9cl0h8qPd52bZgNT4OHUuj54ivLC2kH2KLHLN7HDTfvDZ2Of1zSN/6LTQFrpV1GXQdXEN45P8Uvm2yK8aaF35HMHYPydEoT2qpErVIzK37wxh76+cemzY4G00I+aiu/rtcN/1uBbl42Qu8ZZzwcVfKuwtvgL4DtUBuJGs= ; Message-ID: <20051023083015.18292.qmail@web35705.mail.mud.yahoo.com> Received: from [202.79.62.15] by web35705.mail.mud.yahoo.com via HTTP; Sun, 23 Oct 2005 01:30:15 PDT Date: Sun, 23 Oct 2005 01:30:15 -0700 (PDT) From: kamal kc To: freebsd MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd Subject: in_cksum() for ip packets with multiple mbufs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2005 08:30:19 -0000 i come across this unusual problem. i changed the ip_tos field of the struct ip and computed the checksum by using in_cksum(). when the packet uses only one mbuf the computed checksum is ok but when the packet uses more than one mbuf then the computed checksum is wrong. eg. pinging with payload less than 1470 bytes is ok but with payload greater than 1480 bytes does not work. (the error being bad checksum --that i knew by capturing network packets by ethereal) is it a real problem or i have made some mistake. i put the code before the if_output() in the ip_output() function. help !! kamal __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com