Hi,

for better compliance with POSIX, bind() should return EAFNOSUPPORT rather than EINVAL for a non-matching address family, and I think this would also be the better coice for when addr_len is too small.

This is what the POSIX manpage says about the two error codes:

       EAFNOSUPPORT
              The specified address is not a  valid  address  for  the
              address family of the specified socket.

       EINVAL The  socket is already bound to an address, and the pro-
              tocol does not support binding to a new address; or  the
              socket has been shut down.


cu
        Reinhard

_______________________________________________
stable mailing list
stable@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to