[Bug 196035] New: Subsequent connect on ready socket returns EINVAL instead of ECONNREFUSED

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Dec 16 19:10:07 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196035

            Bug ID: 196035
           Summary: Subsequent connect on ready socket returns EINVAL
                    instead of ECONNREFUSED
           Product: Base System
           Version: 10.1-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: mnunberg at haskalah.org

Created attachment 150652
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=150652&action=edit
Sample program to reproduce

EINVAL is not a documented return code for these situations. Furthermore, the
expected error code, ECONNREFUSED is not returned. If i call getsockopt(s,
SOL_SOCKET, SO_ERROR, ...) _before_ the next connect, i indeed get
'ECONNREFUSED' in the error.

Sample program attached:

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list