All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Wolfgang Bumiller <w.bumiller@proxmox.com>, qemu-trivial@nongnu.org
Subject: Re: [Qemu-trivial] [PATCH] util/qemu-sockets: improve ai_flag hints for ipv6 hosts
Date: Wed, 17 Jun 2015 22:52:58 +0300	[thread overview]
Message-ID: <5581D01A.2020604@msgid.tls.msk.ru> (raw)
In-Reply-To: <1432211609-13466-1-git-send-email-w.bumiller@proxmox.com>

21.05.2015 15:33, Wolfgang Bumiller wrote:
> *) Do not use AI_ADDRCONFIG on listening sockets, because this flag
> makes it impossible to explicitly listen on '127.0.0.1' if no global
> ipv4 address is configured additionally, making this a very
> uncomfortable option.
> *) Add AI_V4MAPPED hint for connecting sockets.
> 
> If your system is globally only connected via ipv6 you often still want
> to be able to use '127.0.0.1' and 'localhost' (even if localhost doesn't
> also have an ipv6 entry).
> For example, PVE - unless explicitly asking for insecure mode - uses
> ipv4 loopback addresses with QEMU for live migrations tunneled over SSH.
> These fail to start because AI_ADDRCONFIG makes getaddrinfo refuse to
> work with '127.0.0.1'.
> 
> As for the AI_V4MAPPED flag: glibc uses it by default, and providing
> non-0 flags removes it. I think it makes sense to use it.
> 
> I also want to point out that glibc explicitly sidesteps POSIX standards
> when passing 0 as hints by then assuming both AI_V4MAPPED and
> AI_ADDRCONFIG (the latter being a rather weird choice IMO), while
> according to POSIX.1-2001 it should be assumed 0. (glibc considers its
> choice an improvement.)
> Since either AI_CANONNAME or AI_PASSIVE are passed in our cases, glibc's
> default flags in turn are disabled again unless explicitly added, which
> I do with this patch.

Applied (finally!) to -trivial.  I'm sorry for the delay.  Thank you!

/mjt


      reply	other threads:[~2015-06-17 19:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21 12:33 [Qemu-trivial] [PATCH] util/qemu-sockets: improve ai_flag hints for ipv6 hosts Wolfgang Bumiller
2015-06-17 19:52 ` Michael Tokarev [this message]

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=5581D01A.2020604@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=qemu-trivial@nongnu.org \
    --cc=w.bumiller@proxmox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.