Re: bind EADDRNOTAVAIL at wrong postition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Philipp.

On Tue, Nov 05, 2024 at 03:54:36PM GMT, Philipp Takacs wrote:
> Hi Alex
> 
> [2024-11-01 13:48] Alejandro Colomar <alx@xxxxxxxxxx>
> > Hi Philipp,
> >
> > On Sun, Oct 06, 2024 at 03:17:48AM +0200, Philipp Takacs wrote:
> > > Hi
> > > 
> > > In bind(2) there are general errors and errors specific for AF_UNIX. The
> > > EADDRNOTAVAIL error is sorted at the AF_UNIX specific errors. But in
> > > posix[0] EADDRNOTAVAIL is a normal error.
> >
> > Do you know any system under which it happens with a socket other than
> > AF_UNIX?  It would be interesting to know if that's just a POSIX thing,
> > or if actual systems do have that.
> 
> I found this while debugging a bug[0] on in the OpenSMTPD package of
> Debian. The problem was that the interface was not fully up but already
> had IP(v6) addresses configured. So OpenSMTPD get the addresses from
> the Interface and the bind failed with EADDRNOTAVAIL.
> 
> There are also some other places where the linux kernel returns
> EADDRNOTAVAIL on non AF_UNIX sockets, for example in sctp[1].

Hmmm, then it looks like a documentation bug.  Would you mind sending a
patch?

Have a lovely night!
Alex

> 
> Philipp
> 
> [0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059700
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/sctp/socket.c#n399
> 
> >
> > Have a lovely day!
> > Alex
> >
> > > 
> > > Philipp
> > > 
> > > [0] https://pubs.opengroup.org/onlinepubs/9699919799/functions/bind.html
> >
> > -- 
> > <https://www.alejandro-colomar.es/>
> > part 2     application/pgp-signatur   833

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux