aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/ipt_mark.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2005-08-09 19:22:01 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 15:29:31 -0700
commitbf3a46aa9b96f6eb3a49a568f72a2801c3e830c0 (patch)
tree4387ee7d8ef83348338a9d433c93139a4747dcb5 /net/ipv4/netfilter/ipt_mark.c
parentMerge refs/heads/upstream from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev (diff)
downloadlinux-dev-bf3a46aa9b96f6eb3a49a568f72a2801c3e830c0.tar.xz
linux-dev-bf3a46aa9b96f6eb3a49a568f72a2801c3e830c0.zip
[NETFILTER]: convert nfmark and conntrack mark to 32bit
As discussed at netconf'05, we convert nfmark and conntrack-mark to be 32bits even on 64bit architectures. Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/ipv4/netfilter/ipt_mark.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ipv4/netfilter/ipt_mark.c b/net/ipv4/netfilter/ipt_mark.c
index 8955728127b9..00bef6cdd3f8 100644
--- a/net/ipv4/netfilter/ipt_mark.c
+++ b/net/ipv4/netfilter/ipt_mark.c
@@ -37,9 +37,16 @@ checkentry(const char *tablename,
unsigned int matchsize,
unsigned int hook_mask)
{
+ struct ipt_mark_info *minfo = (struct ipt_mark_info *) matchinfo;
+
if (matchsize != IPT_ALIGN(sizeof(struct ipt_mark_info)))
return 0;
+ if (minfo->mark > 0xffffffff || minfo->mask > 0xffffffff) {
+ printk(KERN_WARNING "mark: only supports 32bit mark\n");
+ return 0;
+ }
+
return 1;
}