aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/netfilter/xt_set.h
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2014-11-30 19:56:53 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2014-12-03 12:43:35 +0100
commita51b9199b1e092da5ee4a89852e84b4c52ae6044 (patch)
tree6753ba88f049b6e6527e22209861b51dac19b18c /include/uapi/linux/netfilter/xt_set.h
parentnetfilter: ipset: Support updating extensions when the set is full (diff)
downloadlinux-dev-a51b9199b1e092da5ee4a89852e84b4c52ae6044.tar.xz
linux-dev-a51b9199b1e092da5ee4a89852e84b4c52ae6044.zip
netfilter: ipset: Alignment problem between 64bit kernel 32bit userspace
Sven-Haegar Koch reported the issue: sims:~# iptables -A OUTPUT -m set --match-set testset src -j ACCEPT iptables: Invalid argument. Run `dmesg' for more information. In syslog: x_tables: ip_tables: set.3 match: invalid size 48 (kernel) != (user) 32 which was introduced by the counter extension in ipset. The patch fixes the alignment issue with introducing a new set match revision with the fixed underlying 'struct ip_set_counter_match' structure. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/uapi/linux/netfilter/xt_set.h')
-rw-r--r--include/uapi/linux/netfilter/xt_set.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/uapi/linux/netfilter/xt_set.h b/include/uapi/linux/netfilter/xt_set.h
index d6a1df1f2947..d4e02348384c 100644
--- a/include/uapi/linux/netfilter/xt_set.h
+++ b/include/uapi/linux/netfilter/xt_set.h
@@ -66,8 +66,8 @@ struct xt_set_info_target_v2 {
struct xt_set_info_match_v3 {
struct xt_set_info match_set;
- struct ip_set_counter_match packets;
- struct ip_set_counter_match bytes;
+ struct ip_set_counter_match0 packets;
+ struct ip_set_counter_match0 bytes;
__u32 flags;
};
@@ -81,4 +81,13 @@ struct xt_set_info_target_v3 {
__u32 timeout;
};
+/* Revision 4 match */
+
+struct xt_set_info_match_v4 {
+ struct xt_set_info match_set;
+ struct ip_set_counter_match packets;
+ struct ip_set_counter_match bytes;
+ __u32 flags;
+};
+
#endif /*_XT_SET_H*/