]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Reformat listen address prior to checking
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 5 Jun 2013 15:05:50 +0000 (17:05 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 6 Jun 2013 06:31:09 +0000 (08:31 +0200)
commite5fa9db17ed9363f2f07080e92ffb67b12015f65
tree48820238922f2d0c609cd243e791bc0d24407a96
parente90a3598c79df141ee7fca5f669d841e049655f7
qemu: Reformat listen address prior to checking

Currently, a listen address for a SPICE server can be specified. Later,
when the domain is migrated, we need to relocate the graphics which
involves telling new destination to the SPICE server. However, we can't
just assume the listen address is the new location, because the listen
address can be ANYCAST (0.0.0.0 for IPv4, :: for IPv6). In which case,
we want to pass the remote hostname. But there are some troubles with
ANYCAST. In both IPv4 and IPv6 it has many ways for specifying such
address. For instance, in IPv4: 0, 0.0, 0.0.0, 0.0.0.0.  The number of
variations gets bigger in IPv6 world. Hence, in order to check for
ANYCAST address sanely, we should take the provided listen address,
parse it and format back in it's full form. Which is exactly what this
patch does.
src/qemu/qemu_migration.c
tests/sockettest.c