Date: Wed, 5 Feb 1997 11:01:57 -0800 (PST) From: Archie Cobbs <archie@whistle.com> To: brian@awfulhak.demon.co.uk (Brian Somers) Cc: brian@utell.co.uk, cmott@srv.net, julian@whistle.com, eivind@dimaga.com, ari.suutari@ps.carel.fi, hackers@freebsd.org Subject: Re: Single socket version of natd Message-ID: <199702051901.LAA23740@bubba.whistle.com> In-Reply-To: <199702050149.BAA29882@awfulhak.demon.co.uk> from Brian Somers at "Feb 5, 97 01:49:00 am"
next in thread | previous in thread | raw e-mail | index | archive | help
> Does anyone know of a reason (besides the divert(4) man page) that the
> sum on incoming packets is zero'd ?
> The code says:
>
> [.....]
> if (hlen == sizeof(struct ip)) {
> ip->ip_sum = in_cksum_hdr(ip);
> } else {
> ip->ip_sum = in_cksum(m, hlen);
> }
> if (ip->ip_sum) {
> ipstat.ips_badsum++;
> goto bad;
> }
> [.....]
>
> Is there any problems with changing this to
>
> u_short sum;
> .....
> if (hlen == sizeof(struct ip)) {
> sum = in_cksum_hdr(ip);
> } else {
> sum = in_cksum(m, hlen);
> }
> if (sum) {
> ipstat.ips_badsum++;
> goto bad;
> }
>
> (and updating divert(4)) ?
Please do!
-Archie
___________________________________________________________________________
Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702051901.LAA23740>
