Date: Fri, 2 Jun 2006 02:29:16 -0700 From: Luigi Rizzo <rizzo@icir.org> To: Max Laier <max@love2party.net> Cc: freebsd-ipfw@freebsd.org Subject: Re: bin/98349 [Re: cvs commit: src/sbin/ipfw ipfw2.c] Message-ID: <20060602022916.B74593@xorpc.icir.org> In-Reply-To: <200606020725.54959.max@love2party.net>; from max@love2party.net on Fri, Jun 02, 2006 at 07:25:47AM %2B0200 References: <200606020517.k525HHLU037819@repoman.freebsd.org> <200606020725.54959.max@love2party.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 02, 2006 at 07:25:47AM +0200, Max Laier wrote: > On Friday 02 June 2006 07:17, Max Laier wrote: > > mlaier 2006-06-02 05:17:17 UTC > > > > FreeBSD src repository > > > > Modified files: > > sbin/ipfw ipfw2.c > > Log: > > Print dynamic rules for IPv6 as well. > > > > PR: bin/98349 > > Submitted by: Mark Andrews > > MFC after: 2 weeks > > > > Revision Changes Path > > 1.90 +15 -5 src/sbin/ipfw/ipfw2.c > > It's highly confusing that we have {src,dst}_{ip,port} in host byte order if i remember well, the design motivation behind this choice was that we do range comparisons on ports and integer manipulation on the ipv4 addresses (to apply masks and generate various indexes), so the most efficient choice for the internal representation was host order. I'd rather keep it this way, as we use these ops very very often, and not only performance but even readability of the code would be impaired changing to network order. > while {src,dst}_ip6 are in network byte order. I think that keeping network As for ipv6 addresses there isn't really (yet ?) a native host support for 128-bit operands so we could as well declare the network order to be the correct one for native manipulation. cheers luigi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060602022916.B74593>