Receive data on socket in TIME_WAIT state

不想你离开。 提交于 2021-02-10 06:42:08

问题


What happens, in below scenarios, when a socket in TIME_WAIT receives a segment

  • a) When it receives lost ACK
  • b) When sending node wants to establish another new connection using same src_ip:src_port on the server to same dst_ip:dst_port for which the server already has a TIME_WAIT socket.

Will it ignore/drop it, sends a reset or reuse the TIME_WAIT socket?

Thanks

M


回答1:


a) When it receives lost ACK

Nothing.

b) When sending node wants to establish another new connection using same src_ip:src_port on the server to same dst_ip:dst_port for which the server already has a TIME_WAIT socket.

Nothing.

Neither of these cases corresponds to your title.




回答2:


O.K. After digging a bit more and reading the book [page 43] 'Unix Network Programming' I finally figured out what was wrong with my question (answering my own question).

a) The 'Active-Closer', while in TIME_WAIT state, will re-send ACK to a lost/wandering FIN (It is not expecting any ACK at this state [link]http://upload.wikimedia.org/wikipedia/commons/5/55/TCP_CLOSE.svg)

b) TCP will not initiate a new incarnation of a connection that is in TIME_WAIT state. (I still don't know how it prevents it, i.e. does it reset that connection, how can we figure this from reading tcpdump)



来源:https://stackoverflow.com/questions/14666740/receive-data-on-socket-in-time-wait-state

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!