Kevin,

On Thu, Dec 06, 2012 at 02:39:11PM +0800, Kevin Lo wrote:
K> Here's the patch mostly from NetBSD to make socket(2) return EAFNOSUPPORT
K> rather than EPROTONOSUPPORT if the family cannot be found.
K> 
K> http://people.freebsd.org/~kevlo/patch-socket
K> 
K> The man page documents the behavior specified in POSIX.1-2008:
K> 
K> http://pubs.opengroup.org/onlinepubs/9699919799/functions/socket.html
K> 
K> For reference, Linux, NetBSD, and OS X return EAFNOSUPPORT for this.

IMO, the proposed change is correct.

I'd suggest only couple of things:

- Please commit the addition of the pffinddomain() function and its
  documentation separately from socket() return value change.

- May be it is worth to have a comment with reference to POSIX in
  the code in uipc_socket.c, that selects approptiate error value.

-- 
Totus tuus, Glebius.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[email protected]"

Reply via email to