Skip to contentSkip to conversation

xtables: consistent struct compat_xt_counters definition

PATCH Applied Alexey Dobriyan 2 participants 2 messages Feb 5, 2010 – Feb 10, 2010 netfilter

lore
Share & tools
lore
#0 lore raw

There is compat_u64 type which deals with different u64 type alignment on different compat-capable platforms, so use it and removed some hardcoded assumptions.

---

 include/linux/netfilter/x_tables.h |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
include/linux/netfilter/x_tables.h +1 -5
@@ -562,11 +562,7 @@ struct compat_xt_entry_target {
  * current task alignment */
 
 struct compat_xt_counters {
-#if defined(CONFIG_X86_64) || defined(CONFIG_IA64)
-	u_int32_t cnt[4];
-#else
-	u_int64_t cnt[2];
-#endif
+	compat_u64 pcnt, bcnt;			/* Packet and byte counters */
 };
 
 struct compat_xt_counters_info {
#1 lore raw
Quoted 3 lines · Alexey Dobriyan

There is compat_u64 type which deals with different u64 type alignment on different compat-capable platforms, so use it and removed some hardcoded assumptions.

Applied, thanks.