summaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_socket.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/netfilter/xt_socket.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/netfilter/xt_socket.c')
-rw-r--r--net/netfilter/xt_socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/xt_socket.c b/net/netfilter/xt_socket.c
index 018c369c9f0d..2198914707f5 100644
--- a/net/netfilter/xt_socket.c
+++ b/net/netfilter/xt_socket.c
@@ -57,7 +57,7 @@ socket_match(const struct sk_buff *skb, struct xt_action_param *par,
struct sock *sk = skb->sk;
if (!sk)
- sk = nf_sk_lookup_slow_v4(par->net, skb, par->in);
+ sk = nf_sk_lookup_slow_v4(xt_net(par), skb, xt_in(par));
if (sk) {
bool wildcard;
bool transparent = true;
@@ -114,7 +114,7 @@ socket_mt6_v1_v2_v3(const struct sk_buff *skb, struct xt_action_param *par)
struct sock *sk = skb->sk;
if (!sk)
- sk = nf_sk_lookup_slow_v6(par->net, skb, par->in);
+ sk = nf_sk_lookup_slow_v6(xt_net(par), skb, xt_in(par));
if (sk) {
bool wildcard;
bool transparent = true;