Re: xt_ACCOUNT and big endian machines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, 28. October 2009 18:51:14 Jan Engelhardt wrote:
> >I'm starting to get my mind ready for endian issues :)
> >The "net_OR_mask" is in host order if I understood it correctly,
> >so shouldn't this read "(b << 8)"?
> 
> Yes it should be <<8.

Hehe :)

> Besides, "the 8 bit" comment is confusing, because both CIDR/8 and
> CIDR/24 have eight bits either way - just one has eight 1s, one has
> eight 0s.

True that. Didn't came up with a better description back
in the days when I wrote it.

> I am in the process of annotating the entire source with the BE
> markers and I am already getting into situations where I think
> "there's more bswapping amiss"

One more thing came to my mind: The new code transfers the data in
network order from kernel to userspace. This will break existing 
applications which make use of libipt_ACCOUNT like the included "iptaccount"
tool or other applications. We should keep it in host order if possible
or transform it inside libipt_ACCOUNT. Even if we transform it,
it will break systems without updated libipt_ACCOUNT versions.

What do you think?

Cheers,
Thomas
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux