Merge branch 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[deliverable/linux.git] / net / netfilter / xt_socket.c
index 06df2b9110f5f2b9376c19e34241c257b31e5f63..1ba67931eb1b168fabfa78790f5ed53713188f9d 100644 (file)
 #include <net/netfilter/nf_conntrack.h>
 #endif
 
-static void
-xt_socket_put_sk(struct sock *sk)
-{
-       if (sk->sk_state == TCP_TIME_WAIT)
-               inet_twsk_put(inet_twsk(sk));
-       else
-               sock_put(sk);
-}
-
 static int
 extract_icmp4_fields(const struct sk_buff *skb,
                    u8 *protocol,
@@ -216,7 +207,7 @@ socket_match(const struct sk_buff *skb, struct xt_action_param *par,
                                        inet_twsk(sk)->tw_transparent));
 
                if (sk != skb->sk)
-                       xt_socket_put_sk(sk);
+                       sock_gen_put(sk);
 
                if (wildcard || !transparent)
                        sk = NULL;
@@ -370,7 +361,7 @@ socket_mt6_v1_v2(const struct sk_buff *skb, struct xt_action_param *par)
                 */
                wildcard = (!(info->flags & XT_SOCKET_NOWILDCARD) &&
                            sk->sk_state != TCP_TIME_WAIT &&
-                           ipv6_addr_any(&inet6_sk(sk)->rcv_saddr));
+                           ipv6_addr_any(&sk->sk_v6_rcv_saddr));
 
                /* Ignore non-transparent sockets,
                   if XT_SOCKET_TRANSPARENT is used */
@@ -381,7 +372,7 @@ socket_mt6_v1_v2(const struct sk_buff *skb, struct xt_action_param *par)
                                        inet_twsk(sk)->tw_transparent));
 
                if (sk != skb->sk)
-                       xt_socket_put_sk(sk);
+                       sock_gen_put(sk);
 
                if (wildcard || !transparent)
                        sk = NULL;
This page took 0.025563 seconds and 5 git commands to generate.