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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

David GIRAULT-2
URL:
  <https://savannah.nongnu.org/bugs/?57018>

                 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
                Category: TCP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: 2.1.1

    _______________________________________________________

Details:

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




    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?57018>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

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

David GIRAULT-2
Follow-up Comment #1, bug #57018 (project lwip):

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

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?57018>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

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

David GIRAULT-2
Follow-up Comment #2, bug #57018 (project lwip):

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.

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?57018>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel