From owner-freebsd-current Thu Jan 20 17:52: 3 2000 Delivered-To: freebsd-current@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id D401415456 for ; Thu, 20 Jan 2000 17:51:54 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) id SAA18540; Thu, 20 Jan 2000 18:15:23 -0800 (PST) Date: Thu, 20 Jan 2000 18:15:23 -0800 From: Alfred Perlstein To: Jim Bloom Cc: current@freebsd.org Subject: Re: half-fix for stream.c Message-ID: <20000120181523.F14030@fw.wintelcom.net> References: <20000120174115.C14030@fw.wintelcom.net> <3887B8AB.812B4D1A@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <3887B8AB.812B4D1A@acm.org>; from bloom@acm.org on Thu, Jan 20, 2000 at 08:38:51PM -0500 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Jim Bloom [000120 18:02] wrote: > In you fix below, shouldn't the second block of NTOHx actually be HTONx. I > realize that this works because the functions are the same, but it should be > coded correctly. > > Jim Bloom > bloom@acm.org > > + NTOHL(th->th_seq); > + NTOHL(th->th_ack); > + NTOHS(th->th_win); > + NTOHS(th->th_urp); > + th->th_sum = in_cksum(m, len); > + if (th->th_sum) { > + tcpstat.tcps_rcvbadsum++; > + goto drop; > + } > + NTOHL(th->th_seq); > + NTOHL(th->th_ack); > + NTOHS(th->th_win); > + NTOHS(th->th_urp); hmm, that's prolly right, i've been on irc trying to discuss this with people and bit harried. I'm sure there's a better way to do this, but the idea is to move the checksum until after the pcb lookup, but i still have to look at this more. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message