Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jan 2000 18:15:23 -0800
From:      Alfred Perlstein <bright@wintelcom.net>
To:        Jim Bloom <bloom@acm.org>
Cc:        current@freebsd.org
Subject:   Re: half-fix for stream.c
Message-ID:  <20000120181523.F14030@fw.wintelcom.net>
In-Reply-To: <3887B8AB.812B4D1A@acm.org>; from bloom@acm.org on Thu, Jan 20, 2000 at 08:38:51PM -0500
References:  <20000120174115.C14030@fw.wintelcom.net> <3887B8AB.812B4D1A@acm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Jim Bloom <bloom@acm.org> [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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000120181523.F14030>