Hi Expert,

Regarding the folwoing code,
Is there a reason that keepalive timer does not protect from half-close
socket (e.g. other side crash after this step)?

example

C    S

FIN->
  <-ACK

server crash here, the Client is not protected by keepalive

     <-FIN
 ->ACK


I think that this condition should be removed.
"tp->t_state <= TCPS_CLOSIN "


if ((tcp_always_keepalive ||
inp->inp_socket->so_options & SO_KEEPALIVE) &&
tp->t_state <= TCPS_CLOSING) {
thanks
Hanoh
_______________________________________________
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to