Re: TCP connection problem


Vakul Garg <vakul.garg@...>
 

The issue seems fixed in latest code base.

Thanks,
Vakul

-----Original Message-----
From: Paul Sokolovsky [mailto:paul.sokolovsky@linaro.org]
Sent: Tuesday, August 08, 2017 2:08 AM
To: Vakul Garg <vakul.garg@nxp.com>
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] TCP connection problem

Hello Vakul,

What do you mean by "in my application running under zephyr ... TCP POSIX sockets" below? What version of Zephyr do you use?

To shorten communication loops, I'd recommend you to try the latest Zephyr master (now 1.9-pre), and if the problem persists, open a ticket at http://jira.zephyrproject.org/ with the minimal testcase (source
code) to reproduce it.


On Fri, 4 Aug 2017 14:00:34 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

Hi

In my application running under zephyr, I open multiple TCP POSIX
sockets and connect them with a TCP server on linux host. The first
client socket connects with TCP server gracefully. The second client
socket chooses the same local port as the first one. This causes the
TCP connection for second client socket to fail.

On executing 'conn' command on zephyr shell, it reveal that the two of
the connections use same local & remote port. It seems that the
connect() call is not choosing a free port for the socket.

Regards

Vakul
net> conn
Context Iface Flags Local Remote
[ 1] 0x0040c200 0x004051a0 4ST 0.0.0.0:9238 0.0.0.0:0
[ 2] 0x0040c258 0x004051a0 4ST 192.0.2.1:9238
192.0.2.2:52589 [ 3] 0x0040c2b0 0x004051a0 4DU
0.0.0.0:4433 192.0.2.1:4434 [ 4] 0x0040c308 0x004051a0
4ST 0.0.0.0:16384 192.0.2.2:9239 [ 5] 0x0040c360
0x004051a0 4ST 192.0.2.1:9238 192.0.2.2:52590 [ 6]
0x0040c3b8 0x004051a0 4DU 0.0.0.0:4434 192.0.2.1:4433
[ 7] 0x0040c410 0x004051a0 4ST 0.0.0.0:16384 192.0.2.2:9239

TCP Src port Dst port Send-Seq Send-Ack MSS State
0x0040dba0 9238 52589 1234687429 1974441142 1460
ESTABLISHED 0x0040dc60 9238 52590 2778482509 379001672
1460 ESTABLISHED 0x0040dd20 16384 9239 1326661533
1311733184 1460 ESTABLISHED 0x0040dde0 9238 0
2778482508 379001612 1460 LISTEN 0x0040dea0 16384 9239
2832855501 0 1460 SYN_SENT


--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog

Join users@lists.zephyrproject.org to automatically receive all group messages.