diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2015-12-15 22:30:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-15 23:26:52 -0500 |
commit | c1e64e298b8cad309091b95d8436a0255c84f54a (patch) | |
tree | c9ddd8cb837aabafdea04d5c04b74902e5da1a21 /include/net/tcp.h | |
parent | 6eb5d2e08f071c05ecbe135369c9ad418826cab2 (diff) |
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>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index f80e74c5ad18..3077735b348d 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -1170,6 +1170,8 @@ void tcp_set_state(struct sock *sk, int state); | |||
1170 | 1170 | ||
1171 | void tcp_done(struct sock *sk); | 1171 | void tcp_done(struct sock *sk); |
1172 | 1172 | ||
1173 | int tcp_abort(struct sock *sk, int err); | ||
1174 | |||
1173 | static inline void tcp_sack_reset(struct tcp_options_received *rx_opt) | 1175 | static inline void tcp_sack_reset(struct tcp_options_received *rx_opt) |
1174 | { | 1176 | { |
1175 | rx_opt->dsack = 0; | 1177 | rx_opt->dsack = 0; |