Re: xt_ACCOUNT and big endian machines

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

 



Hello Jan,

On Friday, 30. October 2009 18:49:21 you wrote:
> >What do you think?
> 
> I think it is a non-issue, because all three of libxt_ACCOUNT,
> xt_ACCOUNT.ko and iptaccount are updated at the same time.
> Especially so if you are an Xtables-addons user!

Yes, though this would break external applications that use
libxt_ACCOUNT as they expect the data to be in host order.
Not everyone is just using the command line "iptaccount" tool.

> I will bump the .revision too so that the chance of accidental
> collisions is lowered.

Ok

> Transfer via IPT_SO_... still uses host order.

>From the new code:

xt_ACCOUNT.c: ipt_acc_handle_copy_data():
handle_ip.ip = htonl(net_ip | net_OR_mask | i);

This really looks like network order for
the kernel -> userspace transfer.

-> Breakage for libxt_ACCOUNT library users.

> And I went through the source and annotated it with appropriate __be
> markers plus a htonl->ntohl fix.

Thanks!

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