]> granicus.if.org Git - ipset/commitdiff
Explicitly add padding elements to hash:net,net and hash:net,port,net
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 9 Oct 2014 08:58:30 +0000 (10:58 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Tue, 18 Nov 2014 06:56:14 +0000 (07:56 +0100)
The elements must be u32 sized for the used hash function.

kernel/net/netfilter/ipset/ip_set_hash_netnet.c
kernel/net/netfilter/ipset/ip_set_hash_netportnet.c

index da00284b3571a748d843d0d79f6a193a876000d2..ea8772afb6e70c4d366220fc7654f64793e4ef88 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 b8053d675fc39ce0261dcf6270bc7616f383884c..bfaa94c7baa79300da255f9f7761f888b79136e7 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;
 };