summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2015-09-18 14:33:03 -0500
committerPablo Neira Ayuso <pablo@netfilter.org>2015-09-18 21:59:31 +0200
commita4ffe319ae72034e3f3332698a2fd83b6f063b18 (patch)
tree779dcc698d6438487e405a6ccea64dd57cc81afb /net
parent206e8c00752fbe9cc463184236ac64b2a532cda5 (diff)
downloadlinux-stable-a4ffe319ae72034e3f3332698a2fd83b6f063b18.tar.gz
linux-stable-a4ffe319ae72034e3f3332698a2fd83b6f063b18.tar.bz2
linux-stable-a4ffe319ae72034e3f3332698a2fd83b6f063b18.zip
act_connmark: Remember the struct net instead of guessing it.
Stop guessing the struct net instead of remember it. Guessing is just silly and will be problematic in the future when I implement routes between network namespaces. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/sched/act_connmark.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/act_connmark.c b/net/sched/act_connmark.c
index 5019a47b9270..413ac39147d8 100644
--- a/net/sched/act_connmark.c
+++ b/net/sched/act_connmark.c
@@ -74,7 +74,7 @@ static int tcf_connmark(struct sk_buff *skb, const struct tc_action *a,
zone.id = ca->zone;
zone.dir = NF_CT_DEFAULT_ZONE_DIR;
- thash = nf_conntrack_find_get(dev_net(skb->dev), &zone, &tuple);
+ thash = nf_conntrack_find_get(ca->net, &zone, &tuple);
if (!thash)
goto out;
@@ -119,6 +119,7 @@ static int tcf_connmark_init(struct net *net, struct nlattr *nla,
ci = to_connmark(a);
ci->tcf_action = parm->action;
+ ci->net = net;
ci->zone = parm->zone;
tcf_hash_insert(a);