Notify the use via setting errno when a TCP RST segment is received
either in the CLOSING or LAST-ACK state. Reviewed by: hiren MFC after: 3 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D8371
This commit is contained in:
parent
c702a80e27
commit
6779a1a101
@ -2202,6 +2202,8 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
case TCPS_FIN_WAIT_1:
|
||||
case TCPS_FIN_WAIT_2:
|
||||
case TCPS_CLOSE_WAIT:
|
||||
case TCPS_CLOSING:
|
||||
case TCPS_LAST_ACK:
|
||||
so->so_error = ECONNRESET;
|
||||
close:
|
||||
tcp_state_change(tp, TCPS_CLOSED);
|
||||
|
@ -746,6 +746,8 @@ tcp_do_slowpath(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
case TCPS_FIN_WAIT_1:
|
||||
case TCPS_FIN_WAIT_2:
|
||||
case TCPS_CLOSE_WAIT:
|
||||
case TCPS_CLOSING:
|
||||
case TCPS_LAST_ACK:
|
||||
so->so_error = ECONNRESET;
|
||||
close:
|
||||
tcp_state_change(tp, TCPS_CLOSED);
|
||||
|
Loading…
x
Reference in New Issue
Block a user