Review request: fix return value of socket(2) on no family found

Kevin Lo kevlo at kevlo.org
Thu Dec 6 06:39:13 UTC 2012


Hi,

Here's the patch mostly from NetBSD to make socket(2) return EAFNOSUPPORT
rather than EPROTONOSUPPORT if the family cannot be found.

http://people.freebsd.org/~kevlo/patch-socket

The man page documents the behavior specified in POSIX.1-2008:

http://pubs.opengroup.org/onlinepubs/9699919799/functions/socket.html

For reference, Linux, NetBSD, and OS X return EAFNOSUPPORT for this.

     Kevin



More information about the freebsd-net mailing list