Linux Manual Pages development
 help / color / mirror / Atom feed
From: Philipp Takacs <philipp@bureaucracy.de>
To: Alejandro Colomar <alx@kernel.org>
Cc: linux-man@vger.kernel.org
Subject: Re: bind EADDRNOTAVAIL at wrong postition
Date: Tue, 05 Nov 2024 15:54:36 +0100	[thread overview]
Message-ID: <9010315d55e27a361142b67cd5816ba4.philipp@bureaucracy.de> (raw)
In-Reply-To: <20241101124840.icu2zoyzbmfnzckd@devuan>

Hi Alex

[2024-11-01 13:48] Alejandro Colomar <alx@kernel.org>
> 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].

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

  reply	other threads:[~2024-11-05 15:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-06  1:17 bind EADDRNOTAVAIL at wrong postition Philipp Takacs
2024-11-01 12:48 ` Alejandro Colomar
2024-11-05 14:54   ` Philipp Takacs [this message]
2024-11-05 22:34     ` Alejandro Colomar
2024-11-06 10:55       ` Philipp Takacs
2024-11-06 11:02         ` Alejandro Colomar
2024-11-06 19:47           ` Philipp Takacs
2024-11-06 20:20             ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9010315d55e27a361142b67cd5816ba4.philipp@bureaucracy.de \
    --to=philipp@bureaucracy.de \
    --cc=alx@kernel.org \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox