-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TCP connection locally isn't possible #3442
Comments
by Jukka Rissanen: There are two patches applied already to net that should help with loopback TCP connections: net: context: Set the local port correctly in accept I also created a test application (echo-loopback) that tests the UDP and TCP loopback connectivity. It is currently still in DRAFT as there is a memory leak somewhere and I have not yet found it. https://gerrit.zephyrproject.org/r/#/c/13077/ |
by Vakul Garg:
|
by Vakul Garg: Attached a test case. It creates a TCP server socket listening on loopback address in a thread. For each data sent, following errors appear: [net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed} To compile the test case, unpack the attached tarball in zephyr/samples/net. |
Will need to recheck, yeah. |
Didn't have chance to retest, would target for 1.14 re-release testing. |
TCP should work if CONFIG_NET_LOOPBACK is enabled. Probably does not work if that is missing. |
This is old one and should work if CONFIG_NET_LOOPBACK is enabled -> closing for now. |
Reported by Paul Sokolovsky:
Even with GH-3411 fixed and local UDP communication working OK, TCP connection from one local context to another is not possible. What happens is that connect() call seemingly succeeds, but listening socket never has accept callback called. Enabling debug logging, following can be seen:
There're at least 2 problem spots:
I thought 1 is the route cause of 2, but even commenting out net_conn_unregister, "SYN_ACK sent to 0.0.0.0 port 0" still happens.
Overall, I spent an hour trying different hacks and workarounds, and can't get thru to what's wrong exactly. Connection handling is definitely not good, but there's a big problem beyond.
I guess this is not high priority, but it shows that some things in the stack work not general enough, so it would be nice to get to the root cause of this.
(Imported from Jira ZEP-2001)
The text was updated successfully, but these errors were encountered: