Skip to content

Commit

Permalink
netfilter: xtables: consistent struct compat_xt_counters definition
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
  • Loading branch information
Alexey Dobriyan authored and Patrick McHardy committed Feb 10, 2010
1 parent 9ab99d5 commit 0a02604
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions include/linux/netfilter/x_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0a02604

Please sign in to comment.