From owner-freebsd-net Mon Nov 13 7:40:20 2000 Delivered-To: freebsd-net@freebsd.org Received: from if.scientech.com (mail.rv.scientech.com [198.60.89.9]) by hub.freebsd.org (Postfix) with ESMTP id 4F17737B479; Mon, 13 Nov 2000 07:40:18 -0800 (PST) Received: from carcassonne (carcassonne.scientech.com [10.10.25.250]) by if.scientech.com (8.9.3/8.9.3) with ESMTP id IAA00647; Mon, 13 Nov 2000 08:38:47 -0700 Date: Mon, 13 Nov 2000 08:38:46 -0700 (MST) From: Charles Mott To: Ruslan Ermilov Cc: Archie Cobbs , net@FreeBSD.ORG, Ari Suutari Subject: Re: libalias: Incremental Update of Internet Checksum In-Reply-To: <20001113103852.E34671@sunbay.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, 13 Nov 2000, Ruslan Ermilov wrote: > On Mon, Nov 13, 2000 at 12:29:32AM -0700, Charles Mott wrote: > > Ok, ok -- Ruslan is mathematically correct, but > > the problem is really neglible, because of how checksums > > are commonly verified. Even if DifferentialChecksum() > > incorrectly produces a 0xffff instead of 0x0000, this error > > does not affect the verification sum computed by a recipient > > machine. > > > > To quote from RF 1624: > > > > If an end system verifies the checksum by including the checksum > > field itself in the one's complement sum and then comparing the > > result against -0, as recommended by RFC 1071, it does not matter if > > an intermediate system generated a -0 instead of +0 due to the RFC > > 1141 property described here. > > > That's true but it does not mean that there is no problem. The checksum > value of 0xffff is incorrect, because one's complement sum is guaranteed > to be a non-zero if at least one item is non-zero (which is the case for > IP header -- protocol field is non-zero). It should be corrected. I was just tryng to understand why it has not caused any noticeable problem since 1996. > > Actually I do not understand at all how DifferentialChecksum() works > currently. What mathematica it is based on? I just worked it out myself -- I was unaware of the +0 and -0 paradox. Apparently, I replicated the behavior of RFC 1141 (which is superseded by RFC 1624). Charles Mott To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message