summaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/ipt_MASQUERADE.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso2016-11-03 10:56:21 +0100
committerPablo Neira Ayuso2016-11-03 10:56:21 +0100
commit613dbd95723aee7abd16860745691b6c7bda20dc (patch)
tree51b5f91d3ac78dc092a1451597ccf0dd0c600764 /net/ipv4/netfilter/ipt_MASQUERADE.c
parentnetfilter: deprecate NF_STOP (diff)
downloadkernel-qcow2-linux-613dbd95723aee7abd16860745691b6c7bda20dc.tar.gz
kernel-qcow2-linux-613dbd95723aee7abd16860745691b6c7bda20dc.tar.xz
kernel-qcow2-linux-613dbd95723aee7abd16860745691b6c7bda20dc.zip
netfilter: x_tables: move hook state into xt_action_param structure
Place pointer to hook state in xt_action_param structure instead of copying the fields that we need. After this change xt_action_param fits into one cacheline. This patch also adds a set of new wrapper functions to fetch relevant hook state structure fields. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv4/netfilter/ipt_MASQUERADE.c')
-rw-r--r--net/ipv4/netfilter/ipt_MASQUERADE.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c
index da7f02a0b868..34cfb9b0bc0a 100644
--- a/net/ipv4/netfilter/ipt_MASQUERADE.c
+++ b/net/ipv4/netfilter/ipt_MASQUERADE.c
@@ -55,7 +55,8 @@ masquerade_tg(struct sk_buff *skb, const struct xt_action_param *par)
range.min_proto = mr->range[0].min;
range.max_proto = mr->range[0].max;
- return nf_nat_masquerade_ipv4(skb, par->hooknum, &range, par->out);
+ return nf_nat_masquerade_ipv4(skb, xt_hooknum(par), &range,
+ xt_out(par));
}
static struct xt_target masquerade_tg_reg __read_mostly = {