From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 12/12] netfilter: ipset: Explicitly add padding elements to hash:net, net and hash:net, port, net
Date: Wed, 3 Dec 2014 13:55:42 +0100 [thread overview]
Message-ID: <1417611342-25257-13-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1417611342-25257-1-git-send-email-pablo@netfilter.org>
From: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
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 | 2 ++
net/netfilter/ipset/ip_set_hash_netportnet.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/net/netfilter/ipset/ip_set_hash_netnet.c b/net/netfilter/ipset/ip_set_hash_netnet.c
index da00284..ea8772a 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 {
__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/net/netfilter/ipset/ip_set_hash_netportnet.c b/net/netfilter/ipset/ip_set_hash_netportnet.c
index b8053d6..bfaa94c 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 {
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;
};
--
1.7.10.4
next prev parent reply other threads:[~2014-12-03 12:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 12:55 [PATCH 00/12] Netfilter updates for net-next Pablo Neira Ayuso
2014-12-03 12:55 ` [PATCH 01/12] netfilter: xt_recent: relax ip_pkt_list_tot restrictions Pablo Neira Ayuso
2014-12-03 12:55 ` [PATCH 02/12] netfilter: conntrack: avoid zeroing timer Pablo Neira Ayuso
2014-12-03 12:55 ` [PATCH 03/12] netfilter: nf_tables_bridge: export nft_reject_ip*hdr_validate functions Pablo Neira Ayuso
2014-12-03 12:55 ` [PATCH 04/12] netfilter: nf_tables_bridge: set the pktinfo for IPv4/IPv6 traffic Pablo Neira Ayuso
2014-12-03 12:55 ` [PATCH 05/12] netfilter: combine IPv4 and IPv6 nf_nat_redirect code in one module Pablo Neira Ayuso
2014-12-03 12:55 ` [PATCH 06/12] netfilter: nf_log_ipv6: correct typo in module description Pablo Neira Ayuso
2014-12-03 12:55 ` [PATCH 07/12] netfilter: ipset: Support updating extensions when the set is full Pablo Neira Ayuso
2014-12-03 12:55 ` [PATCH 08/12] netfilter: ipset: Alignment problem between 64bit kernel 32bit userspace Pablo Neira Ayuso
2014-12-03 12:55 ` [PATCH 09/12] netfilter: ipset: Indicate when /0 networks are supported Pablo Neira Ayuso
2014-12-03 12:55 ` [PATCH 10/12] netfilter: ipset: Simplify cidr handling for hash:*net* types Pablo Neira Ayuso
2014-12-03 12:55 ` [PATCH 11/12] netfilter: ipset: Allocate the proper size of memory when /0 networks are supported Pablo Neira Ayuso
2014-12-03 12:55 ` Pablo Neira Ayuso [this message]
2014-12-06 4:58 ` [PATCH 00/12] Netfilter updates for net-next David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1417611342-25257-13-git-send-email-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).