Problem with shutdown(fd, 1) on tcp sockets in 2.2

David Wragg (
25 Apr 1999 16:13:05 +0000

tcp_shutdown in net/ipv4/tcp.c begins with:

void tcp_shutdown(struct sock *sk, int how)
/* We need to grab some memory, and put together a FIN,
* and then put it into the queue to be sent.
* Tim MacKenzie( 4 Dec '92.
if (!(how & SEND_SHUTDOWN))

It looks to me like this misinterprets the how value. how == 1 should
mean no more sends, but here SEND_SHUTDOWN is 2 and so some shutdown
calls on tcp sockets will get wrongly ignored.

Dave Wragg

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at