Summary: lwip_select and lwip_connect can not detect "refuse
connection request packet"
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: chunkar
Submitted on: Mon 07 Oct 2019 10:01:55 PM UTC
Severity: 3 - Normal
Item Group: Faulty Behaviour
Assigned to: None
Discussion Lock: Any
Planned Release: None
lwIP version: 2.1.1
I came across an issue while trying to connect to remote TCP server by using
non-blocking socket.After sending the connection request by lwip_connect i am
checking the "writability of the socket by lwip_select and also i am checking
But, even if the remote server sends "refuse connection request", lwip assumes
it is connected to remote tcp server.
Note: Just for example, on ubuntu you can send "refuse connection request"
packet to clients when you follow the steps below:
1)nc -l 45678
2)CTRL+Z = stop netcad
3) After stopping netcad, when you send a connection request, ubuntu will send
'refuse' packet to your connection request. When you try to connect with your
mobile phone, it will reported that it can not connect to remote server.
But when you try to connect with a non-blocking socket by using lwIP 2.1.2,
then lwip_connect returns EINPROGRESS and lwip_select, returns 'socket is
writable' / "OK" when the socket receives the 'refuse packet'.
[bug #57018] lwip_select and lwip_connect can not detect "refuse connection request packet"
Follow-up Comment #2, bug #57018 (project lwip):
Actually this is the original one but i couldnt delete the previous one
As to the meaning of "refuse packet", yes ıt ıs not clear you are rıght: I
mean "Reset", in another words [R.] flagged packet in tcpdump. It means,
server will not be establishing your connection request, so server refuses
your connection request.