Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Mar 2015 12:37:43 -0800
From:      Harrison Grundy <harrison.grundy@astrodoggroup.com>
To:        freebsd-net@freebsd.org, freebsd-arch@freebsd.org
Subject:   Call for testers: Fix incorrect error codes in connect()
Message-ID:  <54F37897.8040009@astrodoggroup.com>

next in thread | raw e-mail | index | archive | help
connect(), in both the man page and under POSIX is documented to only
return EINVAL for invalid lengths of the namelen parameter, which is a
fatal error.

As it stands now, it will also return EINVAL when called on TIMEWAIT
or DROPPED sockets.

The patch at https://reviews.freebsd.org/D1982 changes connect to
return EADDRINUSE on time-wait and ECONNREFUSED on dropped. (Different
values may make more sense here, POSIX doesn't seem to specify.)

If anyone has time to run the patch attached to D1982, it'd be greatly
appreciated as I'm trying to find out just how much (if any) software
currently depends on the old broken behavior.

Any input as to what connect should return in these cases is also
appreciated.

--- Harrison





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54F37897.8040009>