buglwIP - A Lightweight TCP/IP stack - Bugs: bug #57018, lwip_select and lwip_connect can...


You are not allowed to post comments on this tracker with your current authentication level.

bug #57018: lwip_select and lwip_connect can not detect "refuse connection request packet"

Submitter:  Hunkar Ciplak <chunkar>
Submitted:  Mon 07 Oct 2019 10:01:55 PM UTC
Category:  TCP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
lwIP version:  2.1.1

Tue 08 Oct 2019 07:58:18 PM UTC, comment #2: 

Hi Simon,
Actually this is the original one but i couldnt delete the previous one (56964).
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.

Hunkar Ciplak <chunkar>
Tue 08 Oct 2019 07:42:44 PM UTC, comment #1: 

Is this a duplicate to bug #56964 you sent about a week ago? If not, what's the difference?

Simon Goldschmidt <goldsimon>
Group administrator
Mon 07 Oct 2019 10:01:55 PM UTC, original submission:  

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

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

Hunkar Ciplak <chunkar>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by chunkar (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-ee12.
    Corresponding source code