diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-09-18 15:33:03 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-09-18 15:59:31 -0400 |
commit | a4ffe319ae72034e3f3332698a2fd83b6f063b18 (patch) | |
tree | 779dcc698d6438487e405a6ccea64dd57cc81afb /net/sched | |
parent | 206e8c00752fbe9cc463184236ac64b2a532cda5 (diff) |
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/sched')
-rw-r--r-- | net/sched/act_connmark.c | 3 |
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, | |||
74 | zone.id = ca->zone; | 74 | zone.id = ca->zone; |
75 | zone.dir = NF_CT_DEFAULT_ZONE_DIR; | 75 | zone.dir = NF_CT_DEFAULT_ZONE_DIR; |
76 | 76 | ||
77 | thash = nf_conntrack_find_get(dev_net(skb->dev), &zone, &tuple); | 77 | thash = nf_conntrack_find_get(ca->net, &zone, &tuple); |
78 | if (!thash) | 78 | if (!thash) |
79 | goto out; | 79 | goto out; |
80 | 80 | ||
@@ -119,6 +119,7 @@ static int tcf_connmark_init(struct net *net, struct nlattr *nla, | |||
119 | 119 | ||
120 | ci = to_connmark(a); | 120 | ci = to_connmark(a); |
121 | ci->tcf_action = parm->action; | 121 | ci->tcf_action = parm->action; |
122 | ci->net = net; | ||
122 | ci->zone = parm->zone; | 123 | ci->zone = parm->zone; |
123 | 124 | ||
124 | tcf_hash_insert(a); | 125 | tcf_hash_insert(a); |