On Fri, Sep 29, 2017 at 11:00:44AM -0600, Todd C. Miller wrote:
> ... let's also update send(2) to document EADDRNOTAVAIL
> as a possible error.  The description is lifted from connect(2).
> 
> OK?

Yes, we should document the additional case.

Although I think the bug that syslogd was running into was failure
in source address selection.  Then the temporary bind failed as
there was no suitable address.  There is no "specified address".

Perhaps "No suitable address is available..." for both sendto(2)
and connect(2) is more precise.  And bind(2) talks about "the local
machine".

So I guess we should say "No suitable address is available on the
local machine."

Unfortunately there is another EADDRNOTAVAIL in udp_output() if the
foreign port is 0.  This error number semms wrong.  Perhaps
EDESTADDRREQ would be better there.

bluhm

> Index: lib/libc/sys/send.2
> ===================================================================
> RCS file: /cvs/src/lib/libc/sys/send.2,v
> retrieving revision 1.31
> diff -u -p -u -r1.31 send.2
> --- lib/libc/sys/send.2       9 Sep 2014 06:32:37 -0000       1.31
> +++ lib/libc/sys/send.2       29 Sep 2017 16:53:48 -0000
> @@ -196,6 +196,8 @@ and
>  .Fn sendto
>  may return the following error:
>  .Bl -tag -width Er
> +.It Bq Er EADDRNOTAVAIL
> +The specified address is not available on this machine.
>  .It Bq Er EINVAL
>  .Fa len
>  was larger than

Reply via email to