From owner-freebsd-net Wed Oct 11 1: 2:53 2000 Delivered-To: freebsd-net@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id CF85437B66D; Wed, 11 Oct 2000 01:02:48 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.0/8.11.0) id e9B81W559221; Wed, 11 Oct 2000 11:01:32 +0300 (EEST) (envelope-from ru) Date: Wed, 11 Oct 2000 11:01:32 +0300 From: Ruslan Ermilov To: itojun@iijlab.net Cc: Luigi Rizzo , Archie Cobbs , bmilekic@FreeBSD.ORG, freebsd-net@FreeBSD.ORG, Garrett Wollman Subject: Re: ip_input.c patch Message-ID: <20001011110132.D56373@sunbay.com> Mail-Followup-To: itojun@iijlab.net, Luigi Rizzo , Archie Cobbs , bmilekic@FreeBSD.ORG, freebsd-net@FreeBSD.ORG, Garrett Wollman References: <200010110529.HAA85814@info.iet.unipi.it> <23730.971250366@coconut.itojun.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <23730.971250366@coconut.itojun.org>; from itojun@iijlab.net on Wed, Oct 11, 2000 at 04:46:06PM +0900 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, Oct 11, 2000 at 04:46:06PM +0900, itojun@iijlab.net wrote: > > >don't think there is much need for that... ip_len and ip_off are > >mostly or probably only used in ip_input() and there you just need > >to fetch&swap a copy of the value into a local variable on entry > >and use the local variable afterwards. Even better for ip_id which > >is only used for equality comparisons... > > while i 100% agree that we should not swap bytes in ip_input, > we need to be very sure to preserve (strange) byte ordering constraint > in raw ip socket (IP_HDRINCL)... so be careful. > If noone objects, I will prepare the patch that avoids byte-swapping for ip_len and ip_off (I have recently done a similar thing for ip_id). -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message