summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2014-10-09 10:58:30 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2014-10-21 07:06:11 +0200
commit0fe37dcadf62db69fffd29afc7817490ce77fb25 (patch)
tree98828bd09b26886ee351b39008bf591bf777c204
parent897af99ede65da9aedb8686851f4b61a87dfb330 (diff)
downloadipset-0fe37dcadf62db69fffd29afc7817490ce77fb25.tar.gz
Explicitly add padding elements to hash:net,net and hash:net,port,net
The elements must be u32 sized for the used hash function.
-rw-r--r--kernel/net/netfilter/ipset/ip_set_hash_netnet.c2
-rw-r--r--kernel/net/netfilter/ipset/ip_set_hash_netportnet.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/kernel/net/netfilter/ipset/ip_set_hash_netnet.c b/kernel/net/netfilter/ipset/ip_set_hash_netnet.c
index da00284..ea8772a 100644
--- a/kernel/net/netfilter/ipset/ip_set_hash_netnet.c
+++ b/kernel/net/netfilter/ipset/ip_set_hash_netnet.c
@@ -46,6 +46,7 @@ struct hash_netnet4_elem {
__be64 ipcmp;
};
u8 nomatch;
+ u8 padding;
union {
u8 cidr[2];
u16 ccmp;
@@ -271,6 +272,7 @@ hash_netnet4_uadt(struct ip_set *set, struct nlattr *tb[],
struct hash_netnet6_elem {
union nf_inet_addr ip[2];
u8 nomatch;
+ u8 padding;
union {
u8 cidr[2];
u16 ccmp;
diff --git a/kernel/net/netfilter/ipset/ip_set_hash_netportnet.c b/kernel/net/netfilter/ipset/ip_set_hash_netportnet.c
index b8053d6..bfaa94c 100644
--- a/kernel/net/netfilter/ipset/ip_set_hash_netportnet.c
+++ b/kernel/net/netfilter/ipset/ip_set_hash_netportnet.c
@@ -53,6 +53,7 @@ struct hash_netportnet4_elem {
u8 cidr[2];
u16 ccmp;
};
+ u16 padding;
u8 nomatch:1;
u8 proto;
};
@@ -324,6 +325,7 @@ struct hash_netportnet6_elem {
u8 cidr[2];
u16 ccmp;
};
+ u16 padding;
u8 nomatch:1;
u8 proto;
};