Call for testers: Fix incorrect error codes in connect()

Harrison Grundy harrison.grundy at astrodoggroup.com
Sun Mar 1 20:40:22 UTC 2015


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




More information about the freebsd-net mailing list