diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2015-08-08 15:40:01 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-08-11 06:29:01 -0400 |
commit | 308ac9143ee2208f54d061eca54a89da509b5d92 (patch) | |
tree | 25edc149b4a99d3edf58927e15c6881044d60ade /net/sched | |
parent | 3499abb249bb5ed9d21031944bc3059ec4aa2909 (diff) |
netfilter: nf_conntrack: push zone object into functions
This patch replaces the zone id which is pushed down into functions
with the actual zone object. It's a bigger one-time change, but
needed for later on extending zones with a direction parameter, and
thus decoupling this additional information from all call-sites.
No functional changes in this patch.
The default zone becomes a global const object, namely nf_ct_zone_dflt
and will be returned directly in various cases, one being, when there's
f.e. no zoning support.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/act_connmark.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sched/act_connmark.c b/net/sched/act_connmark.c index f2b540220ad0..e67a1bdd0929 100644 --- a/net/sched/act_connmark.c +++ b/net/sched/act_connmark.c | |||
@@ -37,6 +37,7 @@ static int tcf_connmark(struct sk_buff *skb, const struct tc_action *a, | |||
37 | struct nf_conntrack_tuple tuple; | 37 | struct nf_conntrack_tuple tuple; |
38 | enum ip_conntrack_info ctinfo; | 38 | enum ip_conntrack_info ctinfo; |
39 | struct tcf_connmark_info *ca = a->priv; | 39 | struct tcf_connmark_info *ca = a->priv; |
40 | struct nf_conntrack_zone zone; | ||
40 | struct nf_conn *c; | 41 | struct nf_conn *c; |
41 | int proto; | 42 | int proto; |
42 | 43 | ||
@@ -70,7 +71,9 @@ static int tcf_connmark(struct sk_buff *skb, const struct tc_action *a, | |||
70 | proto, &tuple)) | 71 | proto, &tuple)) |
71 | goto out; | 72 | goto out; |
72 | 73 | ||
73 | thash = nf_conntrack_find_get(dev_net(skb->dev), ca->zone, &tuple); | 74 | zone.id = ca->zone; |
75 | |||
76 | thash = nf_conntrack_find_get(dev_net(skb->dev), &zone, &tuple); | ||
74 | if (!thash) | 77 | if (!thash) |
75 | goto out; | 78 | goto out; |
76 | 79 | ||