]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Support IPv6 in port allocator
authorJán Tomko <jtomko@redhat.com>
Fri, 18 Oct 2013 11:52:03 +0000 (13:52 +0200)
committerJán Tomko <jtomko@redhat.com>
Fri, 14 Feb 2014 12:18:35 +0000 (13:18 +0100)
commit0ee9081215be8a11a5b31c5442b039d12466a0ae
treeca635d49cd105e6b912249bec262b777b39974f2
parent531bc0bbd049a22141af98e833abe8acfd610585
Support IPv6 in port allocator

Also try to bind on IPv6 to check if the port is occupied.

Change the mocked bind in the test to return EADDRINUSE
for some ports only for the IPv4/IPv6 socket if we're testing
on a host with IPv6 compiled in.

Also mock socket() to make it fail with EAFNOTSUPPORTED
if LIBVIRT_TEST_IPV4ONLY is set in the environment, to
simulate a host without IPv6 support in the kernel. The
tests are repeated again with this variable set.

https://bugzilla.redhat.com/show_bug.cgi?id=1025407
src/util/virportallocator.c
tests/virportallocatortest.c