Commit 1a8bf6eeef9fe417f90e5338a2fd7fba69c6d0e4

Authored by Eric Dumazet
Committed by Pablo Neira Ayuso
1 parent 1255ce5f10

netfilter: xt_socket: use sock_gen_put()

TCP listener refactoring, part 7 :

Use sock_gen_put() instead of xt_socket_put_sk() for future
SYN_RECV support.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

Showing 1 changed file with 2 additions and 11 deletions Side-by-side Diff

net/netfilter/xt_socket.c
... ... @@ -35,15 +35,6 @@
35 35 #include <net/netfilter/nf_conntrack.h>
36 36 #endif
37 37  
38   -static void
39   -xt_socket_put_sk(struct sock *sk)
40   -{
41   - if (sk->sk_state == TCP_TIME_WAIT)
42   - inet_twsk_put(inet_twsk(sk));
43   - else
44   - sock_put(sk);
45   -}
46   -
47 38 static int
48 39 extract_icmp4_fields(const struct sk_buff *skb,
49 40 u8 *protocol,
... ... @@ -216,7 +207,7 @@
216 207 inet_twsk(sk)->tw_transparent));
217 208  
218 209 if (sk != skb->sk)
219   - xt_socket_put_sk(sk);
  210 + sock_gen_put(sk);
220 211  
221 212 if (wildcard || !transparent)
222 213 sk = NULL;
... ... @@ -381,7 +372,7 @@
381 372 inet_twsk(sk)->tw_transparent));
382 373  
383 374 if (sk != skb->sk)
384   - xt_socket_put_sk(sk);
  375 + sock_gen_put(sk);
385 376  
386 377 if (wildcard || !transparent)
387 378 sk = NULL;