From owner-freebsd-net Sun May 3 17:09:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA28886 for freebsd-net-outgoing; Sun, 3 May 1998 17:09:23 -0700 (PDT) (envelope-from owner-freebsd-net@FreeBSD.ORG) Received: from implode.root.com (implode.root.com [198.145.90.17]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA28873 for ; Sun, 3 May 1998 17:09:13 -0700 (PDT) (envelope-from root@implode.root.com) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.5/8.8.5) with ESMTP id RAA02612; Sun, 3 May 1998 17:07:30 -0700 (PDT) Message-Id: <199805040007.RAA02612@implode.root.com> To: Pierre Beyssac cc: freebsd-net@FreeBSD.ORG Subject: Re: patches for fast forwarding (with kernel option & sysctl) In-reply-to: Your message of "Mon, 04 May 1998 01:43:10 +0200." <19980504014310.A22037@fasterix.frmug.fr.net> From: David Greenman Reply-To: dg@root.com Date: Sun, 03 May 1998 17:07:30 -0700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Here are new patches to use NetBSD's IPFLOW stuff on -current. To use, store ipflow.c in /sys/netinet, then add IPFLOW to your kernel config. After booting, activate with: These appear to contain the broken header checksumming code. That'll need to be fixed before these are integrated. There is a NetBSD #5380 open on this - author Dennis Ferguson . Text from PR#5380 for proposed fix: >Given an htons() macro which compiles to a constant with a constant >argument the following code fragment avoids generating a 0xffff >checksum, produces a correct checksum in all cases, avoids the #if's, >and does the operation with a single comparison and addition on >machines of either byte order. > > ip->ip_ttl -= IPTTLDEC; > if (ip->ip_sum >= htons(0xffff - (IPTTLDEC << 8))) { > ip->ip_sum += htons(IPTTLDEC << 8) + 1; > } else { > ip->ip_sum += htons(IPTTLDEC << 8); > } -DG David Greenman Co-founder/Principal Architect, The FreeBSD Project To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message