]> git.ipfire.org Git - thirdparty/libvirt.git/commit
port allocator: make used port bitmap global
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Tue, 6 Feb 2018 09:09:06 +0000 (12:09 +0300)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 22 Feb 2018 12:52:45 +0000 (13:52 +0100)
commit7ebc4f2a4ca2a33e7e7ef5e9122d89d6dc31a48a
treedaef7df2f816df46ce4fdb697bf02cb1f3b2aaf2
parent55901229373bea1a787f525b816db4301ea3a531
port allocator: make used port bitmap global

Host tcp4/tcp6 ports is a global resource thus we need to make
port accounting also global or we have issues described in [1] when
port allocator ranges of different instances are overlapped (which
is by default for qemu for example).

Let's have only one global port allocator object that take care
of the entire ports range (0 - 65535) and introduce port range object
for clients to specify desired auto allocation band.

[1] https://www.redhat.com/archives/libvir-list/2017-December/msg00600.html

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
13 files changed:
src/bhyve/bhyve_driver.c
src/bhyve/bhyve_utils.h
src/libvirt_private.syms
src/libxl/libxl_conf.c
src/libxl/libxl_conf.h
src/libxl/libxl_driver.c
src/qemu/qemu_conf.h
src/qemu/qemu_driver.c
src/util/virportallocator.c
src/util/virportallocator.h
tests/bhyvexml2argvtest.c
tests/libxlxml2domconfigtest.c
tests/virportallocatortest.c