Eric Dumazet a3374c42aa tcp: fix FIONREAD/SIOCINQ
tcp_ioctl() tries to take into account if tcp socket received a FIN
to report correct number bytes in receive queue.

But its flaky because if the application ate the last skb,
we return 1 instead of 0.

Correct way to detect that FIN was received is to test SOCK_DONE.

Reported-by: Elliot Hughes <enh@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-18 15:34:31 -04:00
..
2012-10-08 17:42:35 -04:00
2012-10-01 18:39:44 -04:00
2012-10-08 17:42:36 -04:00
2012-10-01 17:35:31 -04:00
2012-10-08 17:42:36 -04:00
2012-10-12 13:56:52 -04:00
2012-09-25 13:22:30 -04:00
2012-10-06 03:04:45 +09:00
2012-10-12 13:52:40 -04:00
2012-10-18 15:34:31 -04:00
2012-10-08 17:42:36 -04:00