diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-09-15 20:04:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-17 17:18:37 -0700 |
commit | 9dff2c966a0a79a4222553a851f17e679fc28a43 (patch) | |
tree | d86e10d6bf21cfcefd4f6eeaa783d24563456d8f /net/ipv6/netfilter/ip6table_mangle.c | |
parent | netfilter: Pass struct net into the netfilter hooks (diff) | |
download | linux-dev-9dff2c966a0a79a4222553a851f17e679fc28a43.tar.xz linux-dev-9dff2c966a0a79a4222553a851f17e679fc28a43.zip |
netfilter: Use nf_hook_state.net
Instead of saying "net = dev_net(state->in?state->in:state->out)"
just say "state->net". As that information is now availabe,
much less confusing and much less error prone.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/netfilter/ip6table_mangle.c')
-rw-r--r-- | net/ipv6/netfilter/ip6table_mangle.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/netfilter/ip6table_mangle.c b/net/ipv6/netfilter/ip6table_mangle.c index b551f5b79fe2..a46dbf097d29 100644 --- a/net/ipv6/netfilter/ip6table_mangle.c +++ b/net/ipv6/netfilter/ip6table_mangle.c @@ -58,7 +58,7 @@ ip6t_mangle_out(struct sk_buff *skb, const struct nf_hook_state *state) flowlabel = *((u_int32_t *)ipv6_hdr(skb)); ret = ip6t_do_table(skb, NF_INET_LOCAL_OUT, state, - dev_net(state->out)->ipv6.ip6table_mangle); + state->net->ipv6.ip6table_mangle); if (ret != NF_DROP && ret != NF_STOLEN && (!ipv6_addr_equal(&ipv6_hdr(skb)->saddr, &saddr) || @@ -83,10 +83,10 @@ ip6table_mangle_hook(const struct nf_hook_ops *ops, struct sk_buff *skb, return ip6t_mangle_out(skb, state); if (ops->hooknum == NF_INET_POST_ROUTING) return ip6t_do_table(skb, ops->hooknum, state, - dev_net(state->out)->ipv6.ip6table_mangle); + state->net->ipv6.ip6table_mangle); /* INPUT/FORWARD */ return ip6t_do_table(skb, ops->hooknum, state, - dev_net(state->in)->ipv6.ip6table_mangle); + state->net->ipv6.ip6table_mangle); } static struct nf_hook_ops *mangle_ops __read_mostly; |