qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Eric Blake" <eblake@redhat.com>,
	"Gerd Hoffmann" <kraxel@gmail.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>
Subject: [Qemu-devel] [PATCH v4 0/5] Fix handling of IPv4/IPv6 dual stack
Date: Fri, 16 Jun 2017 11:12:41 +0100	[thread overview]
Message-ID: <20170616101246.1550-1-berrange@redhat.com> (raw)

This is a followup to:

  v1: https://lists.nongnu.org/archive/html/qemu-devel/2017-04/msg05659.html
  v2: https://lists.nongnu.org/archive/html/qemu-devel/2017-05/msg04706.html
  v3: https://lists.gnu.org/archive/html/qemu-devel/2017-06/msg00027.html

This was posted as a pull request here:

  https://lists.gnu.org/archive/html/qemu-devel/2017-06/msg01940.html

However, the fixes to patch 5 were non-trivial, so I need to get review
on patch 5 before I send a second pull request.

This series aims to fix a lot of bugs related to handling of IPv4 / IPv6
dual stack.

 - The VNC server mistakenly listened on two separate ports 5900+5901
   when the to= parameter was given
 - IPv6 sockets are accepting IPv4 clients even when IPv4 is set to
   be disabled
 - IPv6 sockets are failing to accept IPv4 clients when IPv4 is not set
   to be disabled
 - The VNC server was loosing the ipv4=/ipv6= settings due to a bug
   in the DNS resolver

The behaviour of all this is really subtle and hard to get working correctly
across all the different network backends. Thus, the most important part of
this patch series is the last patch which adds a test case covering the
backends for -vnc, -chardev tcp, -net socket, and -incoming socket, with
a 120 entry matrix.

IOW, if you think any of the first 4 patches are applying the wrong logic,
then take a look at the last patch and indicate which test matrix entries
are believed to be defining wrong behaviour :-)

Changed in v4:

 - Change test suite so that it copes with differing getaddrinfo()
   ordering for IPv4 vs IPv6 results for hostname==NULL
 - List test suite for all qtest arches, not only i386/ppc64
 - Use -machine none so test suite passes on aarch64 and other
   arches with no default machine type.

Changed in v3:

 - Clarified error message in commit message
 - Replace assert with exit (Eric)
 - Fix typo in test comment (Eric)
 - Fix wierd copyright line (Eric)

Daniel P. Berrange (5):
  sockets: ensure we can bind to both ipv4 & ipv6 separately
  sockets: don't block IPv4 clients when listening on "::"
  sockets: ensure we don't accept IPv4 clients when IPv4 is disabled
  io: preserve ipv4/ipv6 flags when resolving InetSocketAddress
  tests: add functional test validating ipv4/ipv6 address flag handling

 io/dns-resolver.c          |   6 +-
 tests/.gitignore           |   1 +
 tests/Makefile.include     |   3 +
 tests/test-sockets-proto.c | 921 +++++++++++++++++++++++++++++++++++++++++++++
 util/qemu-sockets.c        |  71 +++-
 5 files changed, 981 insertions(+), 21 deletions(-)
 create mode 100644 tests/test-sockets-proto.c

-- 
2.9.3

             reply	other threads:[~2017-06-16 10:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-16 10:12 Daniel P. Berrange [this message]
2017-06-16 10:12 ` [Qemu-devel] [PATCH v4 1/5] sockets: ensure we can bind to both ipv4 & ipv6 separately Daniel P. Berrange
2017-06-16 10:12 ` [Qemu-devel] [PATCH v4 2/5] sockets: don't block IPv4 clients when listening on "::" Daniel P. Berrange
2017-06-16 10:12 ` [Qemu-devel] [PATCH v4 3/5] sockets: ensure we don't accept IPv4 clients when IPv4 is disabled Daniel P. Berrange
2017-06-16 10:12 ` [Qemu-devel] [PATCH v4 4/5] io: preserve ipv4/ipv6 flags when resolving InetSocketAddress Daniel P. Berrange
2017-06-16 10:12 ` [Qemu-devel] [PATCH v4 5/5] tests: add functional test validating ipv4/ipv6 address flag handling Daniel P. Berrange
2017-06-27  2:10   ` Eric Blake
2017-06-27  2:30     ` Eric Blake
2017-06-27  9:45       ` Daniel P. Berrange

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=20170616101246.1550-1-berrange@redhat.com \
    --to=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=kraxel@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).