Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionDaniel Berrangé
2017-05-22 14:39:49 UTC
Description of problem:
Consider the following migration arg:
$ qemu-system-x86_64 -incoming tcp:[::]:9000,ipv4
which requests binding to a IPv6 address "::", but also requests IPv4 access only. This is a nonsensical combination and should report an error message. Indeed, other QEMU backends (VNC, chardev, etc) do report an error in this scenario, but the migration code does not, due to a bug in inet_parse
Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.9.0-1.el7
How reproducible:
Always
Steps to Reproduce:
1. $ qemu-system-x86_64 -incoming tcp:[::]:9000,ipv4
2.
3.
Actual results:
QEMU listens on "::"
Expected results:
Exits with error message such as
qemu-system-x86_64: -incoming tcp:[::]:9000,ipv4: address resolution failed for :::9000: Address family for hostname not supported
Will be picked up for 7.5 via rebase, because it is included in upstream 2.10:
commit 4dc5d815c43b0138e5d6753e788343f6e2cb6b5f
Author: Daniel P. Berrange <berrange>
Date: Wed May 17 18:35:40 2017 +0100
sockets: don't block IPv4 clients when listening on "::"
When inet_parse() parses the hostname, it is forcing the
has_ipv6 && ipv6 flags if the address contains a ":". This
means that if the user had set the ipv4=on flag, to try to
restrict the listener to just ipv4, an error would not have
been raised. eg
-incoming tcp:[::]:9000,ipv4
should have raised an error because listening for IPv4
on "::" is a non-sensical combination. With this removed,
we now call getaddrinfo() on "::" passing PF_INET and
so getaddrinfo reports an error about the hostname being
incompatible with the requested protocol:
qemu-system-x86_64: -incoming tcp:[::]:9000,ipv4: address resolution
failed for :::9000: Address family for hostname not supported
Likewise it is explicitly setting the has_ipv4 & ipv4
flags when the address contains only digits + '.'. This
has no ill-effect, but also has no benefit, so is removed.
Acked-by: Gerd Hoffmann <kraxel>
Reviewed-by: Philippe Mathieu-Daudé <f4bug>
Reviewed-by: Eric Blake <eblake>
Signed-off-by: Daniel P. Berrange <berrange>
Reproduced on qemu-kvm-rhev-2.9.0-16.el7_4.12.ppc64le:
]# /usr/libexec/qemu-kvm -incoming tcp:[::]:9000,ipv4
VNC server running on ::1:5900
Verified on qemu-kvm-rhev-2.10.0-7.el7.ppc64le:
# /usr/libexec/qemu-kvm -incoming tcp:[::]:9000,ipv4
VNC server running on ::1:5900
qemu-kvm: -incoming tcp:[::]:9000,ipv4: address resolution failed for :::9000: Address family for hostname not supported
QEMU failed to boot up when incoming migration process bind with ipv6 address while ipv6 is disabled.
Setting to VERIFIED.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2018:1104