From owner-freebsd-net Wed Oct 11 12:48:56 2000 Delivered-To: freebsd-net@freebsd.org Received: from info.iet.unipi.it (info.iet.unipi.it [131.114.9.184]) by hub.freebsd.org (Postfix) with ESMTP id A479637B66C; Wed, 11 Oct 2000 12:48:52 -0700 (PDT) Received: (from luigi@localhost) by info.iet.unipi.it (8.9.3/8.9.3) id VAA87973; Wed, 11 Oct 2000 21:48:39 +0200 (CEST) (envelope-from luigi) From: Luigi Rizzo Message-Id: <200010111948.VAA87973@info.iet.unipi.it> Subject: Re: ip_input.c patch In-Reply-To: <23730.971250366@coconut.itojun.org> from "itojun@iijlab.net" at "Oct 11, 2000 04:46:06 pm" To: itojun@iijlab.net Date: Wed, 11 Oct 2000 21:48:39 +0200 (CEST) Cc: Archie Cobbs , bmilekic@FreeBSD.ORG, freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > >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. that should be easier as packets need to be copied between kernel and user space so you can do the swap there (in the userspace copy i think) cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message