netfilter: take care of timewait sockets
authorEric Dumazet <edumazet@google.com>
Tue, 4 Sep 2012 07:49:03 +0000 (07:49 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 6 Sep 2012 12:28:18 +0000 (14:28 +0200)
commit0626af3139572610b56376580d11eb65d45d9dd7
treee1c4664b0afd65788e1508402a5ab60772c2dad0
parent5b716ac728bcc01b1f2a7ed6e437196602237c27
netfilter: take care of timewait sockets

Sami Farin reported crashes in xt_LOG because it assumes skb->sk is a
full blown socket.

Since (41063e9 ipv4: Early TCP socket demux), we can have skb->sk
pointing to a timewait socket.

Same fix is needed in nfnetlink_log.

Diagnosed-by: Florian Westphal <fw@strlen.de>
Reported-by: Sami Farin <hvtaifwkbgefbaei@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nfnetlink_log.c
net/netfilter/xt_LOG.c