Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cac37639 authored by Jozsef Kadlecsik's avatar Jozsef Kadlecsik Committed by Pablo Neira Ayuso
Browse files

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: default avatarJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 77b4311d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
+2 −0
Original line number Diff line number Diff line
@@ -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;
};