]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NETFILTER]: Fix compat_xt_counters alignment for non-x86
authorPatrick McHardy <kaber@trash.net>
Tue, 25 Apr 2006 00:16:28 +0000 (17:16 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Tue, 25 Apr 2006 00:27:30 +0000 (17:27 -0700)
Some (?) non-x86 architectures require 8byte alignment for u_int64_t
even when compiled for 32bit, using u_int32_t in compat_xt_counters
breaks on these architectures, use u_int64_t for everything but x86.

Reported by Andreas Schwab <schwab@suse.de>.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netfilter/x_tables.h

index f6bdef82a322a7faf54e217f975903873eef878a..38701454e197cffcf59bcf27ee52e79531cc8756 100644 (file)
@@ -361,7 +361,11 @@ struct compat_xt_entry_target
 
 struct compat_xt_counters
 {
+#if defined(CONFIG_X86_64) || defined(CONFIG_IA64)
        u_int32_t cnt[4];
+#else
+       u_int64_t cnt[2];
+#endif
 };
 
 struct compat_xt_counters_info