aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nfnetlink_log.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-03-16 21:06:15 -0700
committerDavid S. Miller <davem@davemloft.net>2015-03-17 15:17:59 -0400
commita8399231f0b6e72bc140bcc4fecb0c622298a6bd (patch)
tree32b424cebe059e8081ca93b17cb37af36a235f23 /net/netfilter/nfnetlink_log.c
parentbpf: allow BPF programs access 'protocol' and 'vlan_tci' fields (diff)
downloadlinux-dev-a8399231f0b6e72bc140bcc4fecb0c622298a6bd.tar.xz
linux-dev-a8399231f0b6e72bc140bcc4fecb0c622298a6bd.zip
netfilter: use sk_fullsock() helper
Upcoming request sockets have TCP_NEW_SYN_RECV state and should be special cased a bit like TCP_TIME_WAIT sockets. Signed-off-by; Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/nfnetlink_log.c')
-rw-r--r--net/netfilter/nfnetlink_log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index 11d85b3813f2..61d04bf9be2b 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -539,7 +539,7 @@ __build_packet_message(struct nfnl_log_net *log,
/* UID */
sk = skb->sk;
- if (sk && sk->sk_state != TCP_TIME_WAIT) {
+ if (sk && sk_fullsock(sk)) {
read_lock_bh(&sk->sk_callback_lock);
if (sk->sk_socket && sk->sk_socket->file) {
struct file *file = sk->sk_socket->file;