Message124187
when use socket.close to close the telnet connection, in normal usage the tcp disconnect will be (socket.close send the TCP FIN)
TCP A TCP B
1. ESTABLISHED ESTABLISHED
2. (Close)
FIN-WAIT-1 --> <SEQ=100><ACK=300><CTL=FIN,ACK> --> CLOSE-WAIT
3. FIN-WAIT-2 <-- <SEQ=300><ACK=101><CTL=ACK> <-- CLOSE-WAIT
4. (Close)
TIME-WAIT <-- <SEQ=300><ACK=101><CTL=FIN,ACK> <-- LAST-ACK
5. TIME-WAIT --> <SEQ=101><ACK=301><CTL=ACK> --> CLOSED
6. (2 MSL)
CLOSED
but sometimes socket.close will send TCP RST to disconnect the telnet and with wrong sequence number. This kind of RST will be considering as Network RST attack, and this packet will be dropped, the telnet connection will still established and cannot be closed.
Seems python socket.close has some issues.
def close(self):
self._sock = _closedsocket()
dummy = self._sock._dummy
for method in _delegate_methods:
setattr(self, method, dummy)
close.__doc__ = _realsocket.close.__doc__ |
|
Date |
User |
Action |
Args |
2010-12-17 07:40:38 | sean216 | set | recipients:
+ sean216 |
2010-12-17 07:40:37 | sean216 | set | messageid: <1292571637.97.0.111675378361.issue10724@psf.upfronthosting.co.za> |
2010-12-17 07:40:36 | sean216 | link | issue10724 messages |
2010-12-17 07:40:35 | sean216 | create | |
|