This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients neologix, sean216
Date 2010-12-17.09:07:15
SpamBayes Score 3.4422465e-13
Marked as misclassified No
Message-id <1292576837.47.0.0772024114669.issue10724@psf.upfronthosting.co.za>
In-reply-to
Content
> but sometimes socket.close will send TCP RST to disconnect the telnet and with wrong sequence number

This is called a a "half-duplex" TCP close sequence. Your application is probably closing the socket while there are still data in the receive socket buffer (i.e. unread), so the TCP/IP stack sends a RST to inform the remote end that data has been lost. See RFC 1122 section 4.2.2.13.
Note that in your sample capture, I don't see any invalid sequence/ack number.
Your application should probably not close the connection at this time.

> 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.

There you firewell is broken. Sending a RST in this context is perfectly valid.

As far as I know, this issue is due to your application and firewall settings, and not to Python. Furthermore, Python just calls the underlying close(2) syscall, so even if there were an issue, it's an OS one, nothing Python could do about it.
History
Date User Action Args
2010-12-17 09:07:17neologixsetrecipients: + neologix, sean216
2010-12-17 09:07:17neologixsetmessageid: <1292576837.47.0.0772024114669.issue10724@psf.upfronthosting.co.za>
2010-12-17 09:07:15neologixlinkissue10724 messages
2010-12-17 09:07:15neologixcreate