Ask Your Question
0

TCP client responses with no FIN

asked 2020-11-23 10:45:51 +0000

bremenpl gravatar image

Hello there, I am testing a TCP server application I am writing. On the PC side, I am using a TCP Client for testing purposes. In this scenario, After the client makes the connection with the server and exchanges some data, the server is initializing the closing. This is done by sending FIN+ACK from the server to the client. The problem I am having is the the client responses with ACK and never with FIN+ACK. Here is the screenshot and transcript (cannot upload files here).

https://pastebin.com/6gNfrSMn

10.10.10.1 is the server and 10.10.10.33 is the client. Why isn't the client sending a FIN+ACK after the server initializes the closing? Is this a bug in the client software, or is there something wrong with the server sequence?

edit retag flag offensive close merge delete

Comments

"using a TCP Client" - what is the client software?

Chuckc gravatar imageChuckc ( 2020-11-23 18:24:16 +0000 )edit
bremenpl gravatar imagebremenpl ( 2020-11-23 18:35:43 +0000 )edit

"Modbus Poll is a Modbus master simulator" - it may be the TCP client but at the protocol level it is driving the conversation.
Sample captures attached to these issues: 7902 and 15698 - show the polling software opens and initiates the close on the TCP connection.

Chuckc gravatar imageChuckc ( 2020-11-23 18:59:11 +0000 )edit

Whatever is the layer over the tcp, the client should respond when the server closes the connection. Im not sure I get your point

bremenpl gravatar imagebremenpl ( 2020-11-23 19:10:22 +0000 )edit

In the case of Modbus, the Master is the client, it initiates the connection to the slave, and sends requests to which the slave responds. From your text output (a capture file is so much easier to view), the slave device does send a FIN so the Modbus Poll Master should respond with a FIN. Something to be taken up with the developers of that particular item of closed source software.

Note that closing the connection isn't normal for a slave device, the connection would only be closed if the device was shutting down, not during normal operation.

grahamb gravatar imagegrahamb ( 2020-11-23 19:31:32 +0000 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-11-23 12:23:54 +0000

Jaap gravatar image

What you're seeing is a half closed connection. See RFC 1122, section 4.2.2.13 for further discussion. It's up to the client to close its side.

edit flag offensive delete link more
0

answered 2020-11-23 11:13:51 +0000

hugo.vanderkooij gravatar image

I don't think there is a valid reason fro any client NOT to close the connection as it should with it's own FIN action. So that seems to me an error in the TCP handling on the client.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-11-23 10:45:51 +0000

Seen: 913 times

Last updated: Nov 23 '20