From owner-freebsd-net Wed Oct 11 10:38:14 2000 Delivered-To: freebsd-net@freebsd.org Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (Postfix) with ESMTP id 3561137B66E; Wed, 11 Oct 2000 10:38:11 -0700 (PDT) Received: (from smap@localhost) by whistle.com (8.10.0/8.10.0) id e9BHc9u25143; Wed, 11 Oct 2000 10:38:09 -0700 (PDT) Received: from bubba.whistle.com( 207.76.205.7) by whistle.com via smap (V2.0) id xma025128; Wed, 11 Oct 2000 10:37:52 -0700 Received: (from archie@localhost) by bubba.whistle.com (8.11.0/8.11.0) id e9BHboe45566; Wed, 11 Oct 2000 10:37:50 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200010111737.e9BHboe45566@bubba.whistle.com> Subject: Re: ip_input.c patch In-Reply-To: <20001011110132.D56373@sunbay.com> "from Ruslan Ermilov at Oct 11, 2000 11:01:32 am" To: Ruslan Ermilov Date: Wed, 11 Oct 2000 10:37:50 -0700 (PDT) Cc: itojun@iijlab.net, Luigi Rizzo , Archie Cobbs , bmilekic@FreeBSD.ORG, freebsd-net@FreeBSD.ORG, Garrett Wollman X-Mailer: ELM [version 2.4ME+ PL82 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Ruslan Ermilov writes: > > >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). That would be great (assuming it gets reviewed by -net). -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message