net: diag: Support destroying TCP sockets.
This implements SOCK_DESTROY for TCP sockets. It causes all blocking calls on the socket to fail fast with ECONNABORTED and causes a protocol close of the socket. It informs the other end of the connection by sending a RST, i.e., initiating a TCP ABORT as per RFC 793. ECONNABORTED was chosen for consistency with FreeBSD. Signed-off-by:Lorenzo Colitti <lorenzo@google.com> Acked-by:
Eric Dumazet <edumazet@google.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/net/tcp.h 2 additions, 0 deletionsinclude/net/tcp.h
- net/ipv4/Kconfig 13 additions, 0 deletionsnet/ipv4/Kconfig
- net/ipv4/tcp.c 32 additions, 0 deletionsnet/ipv4/tcp.c
- net/ipv4/tcp_diag.c 19 additions, 0 deletionsnet/ipv4/tcp_diag.c
- net/ipv4/tcp_ipv4.c 1 addition, 0 deletionsnet/ipv4/tcp_ipv4.c
- net/ipv6/tcp_ipv6.c 1 addition, 0 deletionsnet/ipv6/tcp_ipv6.c
Please register or sign in to comment