aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2014-11-30 13:56:57 -0500
committerPablo Neira Ayuso <pablo@netfilter.org>2014-12-03 06:43:36 -0500
commitcac3763967362ace7996532ad3933f493a928a1b (patch)
treeb9309cee14d6f03bbfee0b42e93b059229f47c1a /net
parent77b4311d207c3ed7260da840ba41afa8bd9ca24c (diff)
netfilter: ipset: Explicitly add padding elements to hash:net, net and hash:net, port, net
The elements must be u32 sized for the used hash function. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/ipset/ip_set_hash_netnet.c2
-rw-r--r--net/netfilter/ipset/ip_set_hash_netportnet.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/net/netfilter/ipset/ip_set_hash_netnet.c b/net/netfilter/ipset/ip_set_hash_netnet.c
index da00284b3571..ea8772afb6e7 100644
--- a/net/netfilter/ipset/ip_set_hash_netnet.c
+++ b/net/netfilter/ipset/ip_set_hash_netnet.c
@@ -46,6 +46,7 @@ struct hash_netnet4_elem {
46 __be64 ipcmp; 46 __be64 ipcmp;
47 }; 47 };
48 u8 nomatch; 48 u8 nomatch;
49 u8 padding;
49 union { 50 union {
50 u8 cidr[2]; 51 u8 cidr[2];
51 u16 ccmp; 52 u16 ccmp;
@@ -271,6 +272,7 @@ hash_netnet4_uadt(struct ip_set *set, struct nlattr *tb[],
271struct hash_netnet6_elem { 272struct hash_netnet6_elem {
272 union nf_inet_addr ip[2]; 273 union nf_inet_addr ip[2];
273 u8 nomatch; 274 u8 nomatch;
275 u8 padding;
274 union { 276 union {
275 u8 cidr[2]; 277 u8 cidr[2];
276 u16 ccmp; 278 u16 ccmp;
diff --git a/net/netfilter/ipset/ip_set_hash_netportnet.c b/net/netfilter/ipset/ip_set_hash_netportnet.c
index b8053d675fc3..bfaa94c7baa7 100644
--- a/net/netfilter/ipset/ip_set_hash_netportnet.c
+++ b/net/netfilter/ipset/ip_set_hash_netportnet.c
@@ -53,6 +53,7 @@ struct hash_netportnet4_elem {
53 u8 cidr[2]; 53 u8 cidr[2];
54 u16 ccmp; 54 u16 ccmp;
55 }; 55 };
56 u16 padding;
56 u8 nomatch:1; 57 u8 nomatch:1;
57 u8 proto; 58 u8 proto;
58}; 59};
@@ -324,6 +325,7 @@ struct hash_netportnet6_elem {
324 u8 cidr[2]; 325 u8 cidr[2];
325 u16 ccmp; 326 u16 ccmp;
326 }; 327 };
328 u16 padding;
327 u8 nomatch:1; 329 u8 nomatch:1;
328 u8 proto; 330 u8 proto;
329}; 331};