Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Oct 2000 21:48:39 +0200 (CEST)
From:      Luigi Rizzo <luigi@info.iet.unipi.it>
To:        itojun@iijlab.net
Cc:        Archie Cobbs <archie@whistle.com>, bmilekic@FreeBSD.ORG, freebsd-net@FreeBSD.ORG
Subject:   Re: ip_input.c patch
Message-ID:  <200010111948.VAA87973@info.iet.unipi.it>
In-Reply-To: <23730.971250366@coconut.itojun.org> from "itojun@iijlab.net" at "Oct 11, 2000 04:46:06 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> >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




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