lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #51531] getsockopt/SO_ERROR not returning value stored


From: Joel Cunningham
Subject: [lwip-devel] [bug #51531] getsockopt/SO_ERROR not returning value stored in errno
Date: Fri, 21 Jul 2017 17:29:04 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0

URL:
  <http://savannah.nongnu.org/bugs/?51531>

                 Summary: getsockopt/SO_ERROR not returning value stored in
errno
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: jcunningham
            Submitted on: Fri 21 Jul 2017 09:29:03 PM UTC
                Category: sockets/netconn
                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: git head

    _______________________________________________________

Details:

I've found that getsocktop with SO_ERROR is not returning the value stored in
errno.

The particular application case I'm working with is non-blocking connect. 
connect() returns -1 and then I call getsockopt and get 0, leading my
application to think the connection has completed early.  I then call send()
which returns with an error

I did some debugging and can see that the ERR_INPROGRESS is being returned
from lwip_netconn_do_connect() and EINPROGRESS is set in errno.  But then
getsockopt with SO_ERROR calls netconn_err(), which checks conn->pending_err. 
pending_err doesn't appear to be set in the connect path, but only from the
TCP err callback





    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?51531>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]