netfilter: ipset: Explicitly add padding elements to hash:net, net and hash:net,...
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Sun, 30 Nov 2014 18:56:57 +0000 (19:56 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 3 Dec 2014 11:43:36 +0000 (12:43 +0100)
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>
net/netfilter/ipset/ip_set_hash_netnet.c
net/netfilter/ipset/ip_set_hash_netportnet.c

index da00284..ea8772a 100644 (file)
@@ -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;
index b8053d6..bfaa94c 100644 (file)
@@ -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;
 };