libvirt/src/util
Ján Tomko c2a8256991 virPortAllocatorSetUsed: ignore port 0
Similar to what commit 86dba8f3 did for virPortAllocatorRelease,
ignore port 0 in virPortAllocatorSetUsed.

For all the reasonable use cases the callers already check that
the port is non-zero, however if the port from the XML overflows
unsigned short and turns into 0, it can be set as used by
virPortAllocatorSetUsed but not released by virPortAllocatorRelease.

Also skip port '0' in virPortAllocatorSetUsed to make this behavior
symmetric.

The serenity was disturbed by commit 5dbda5e9 which started using
virPortAllocatorRelease instead of virPortAllocatorSetUsed (false).

https://bugzilla.redhat.com/show_bug.cgi?id=1591645

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-01-25 14:50:05 +01:00
..
iohelper.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
Makefile.inc.am util: error: Export virErrorMsg for use in testsuite 2018-12-14 13:54:50 +01:00
viralloc.c Fix minor typos in messages and docs 2018-12-05 10:39:54 +01:00
viralloc.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virarch.c util: add RISC-V architectures 2018-08-24 13:23:36 +02:00
virarch.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virarptable.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virarptable.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
viratomic.c
viratomic.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
viraudit.c internal: Move <stdio.h> include to internal.h 2018-09-20 10:16:38 +02:00
viraudit.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virauth.c src: More cleanup of some system headers already contained in internal.h 2018-09-20 10:16:39 +02:00
virauth.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virauthconfig.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virauthconfig.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virbitmap.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virbitmap.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virbuffer.c Remove even more Author(s): lines from source files 2019-01-03 13:24:18 +01:00
virbuffer.h Remove even more Author(s): lines from source files 2019-01-03 13:24:18 +01:00
vircgroup.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircgroup.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircgroupbackend.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircgroupbackend.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircgrouppriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircgroupv1.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircgroupv1.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircgroupv2.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircgroupv2.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virclosecallbacks.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virclosecallbacks.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircommand.c qemu: use line breaks in command line args written to log 2018-12-17 15:02:11 +00:00
vircommand.h qemu: use line breaks in command line args written to log 2018-12-17 15:02:11 +00:00
vircommandpriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virconf.c Remove even more Author(s): lines from source files 2019-01-03 13:24:18 +01:00
virconf.h Remove even more Author(s): lines from source files 2019-01-03 13:24:18 +01:00
vircrypto.c Fix minor typos in messages and docs 2018-12-05 10:39:54 +01:00
vircrypto.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virdbus.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virdbus.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virdbuspriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virdevmapper.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virdevmapper.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virdnsmasq.c util: Fix misaligned arguments and misaligned conditions for [if|while|...] 2018-09-24 10:02:40 +02:00
virdnsmasq.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virebtables.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virebtables.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virendian.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virerror.c util: fix translation of error message strings 2018-12-17 17:47:30 +00:00
virerror.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virerrorpriv.h util: error: Export virErrorMsg for use in testsuite 2018-12-14 13:54:50 +01:00
virevent.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virevent.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vireventpoll.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
vireventpoll.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virfcp.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virfcp.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virfdstream.c
virfdstream.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virfile.c util: Introduce xattr getter/setter/remover 2018-12-19 15:31:42 +01:00
virfile.h tests: Introduce qemusecuritytest 2018-12-19 15:32:43 +01:00
virfilecache.c Remove ignore_value or void from unlink calls 2018-09-20 13:45:56 -04:00
virfilecache.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virfirewall.c qemu: use line breaks in command line args written to log 2018-12-17 15:02:11 +00:00
virfirewall.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virfirewallpriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virfirmware.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virfirmware.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virgettext.c internal: Move <stdio.h> include to internal.h 2018-09-20 10:16:38 +02:00
virgettext.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virgic.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virgic.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virhash.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virhash.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virhashcode.c
virhashcode.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virhook.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virhook.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virhostcpu.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virhostcpu.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virhostcpupriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virhostdev.c util: Fixing invalid error checking from virPCIGetNetname() 2019-01-23 10:21:35 +01:00
virhostdev.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virhostmem.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virhostmem.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
viridentity.c util: Fix misaligned arguments and misaligned conditions for [if|while|...] 2018-09-24 10:02:40 +02:00
viridentity.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virinitctl.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virinitctl.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
viriptables.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
viriptables.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
viriscsi.c util: Fix misaligned arguments and misaligned conditions for [if|while|...] 2018-09-24 10:02:40 +02:00
viriscsi.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virjson.c util: Fix misaligned arguments and misaligned conditions for [if|while|...] 2018-09-24 10:02:40 +02:00
virjson.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virkeycode.c util: Fix misaligned arguments and misaligned conditions for [if|while|...] 2018-09-24 10:02:40 +02:00
virkeycode.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virkeyfile.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virkeyfile.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virkmod.c
virkmod.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virlease.c
virlease.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virlockspace.c Revert "virlockspace: Allow caller to specify start and length offset in virLockSpaceAcquireResource" 2018-11-16 13:42:39 +01:00
virlockspace.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virlog.c util: Fix the default log output to 'journald' when running under systemd 2019-01-08 10:01:54 +01:00
virlog.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virmacaddr.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virmacaddr.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virmacmap.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virmacmap.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virmdev.c qemu: vfio-ap device support 2018-10-29 12:45:54 -04:00
virmdev.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virmodule.c Fix minor typos in messages and docs 2018-12-05 10:39:54 +01:00
virmodule.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdev.c virPCIGetNetName: Initialize @netname to NULL 2019-01-24 10:02:31 +01:00
virnetdev.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevbandwidth.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevbandwidth.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevbridge.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevbridge.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevip.c virnetdevip: Avoid cast align warning 2019-01-15 13:00:52 +01:00
virnetdevip.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevmacvlan.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevmacvlan.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevmidonet.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevmidonet.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevopenvswitch.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevopenvswitch.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevtap.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevtap.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevveth.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevveth.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevvlan.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevvlan.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevvportprofile.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevvportprofile.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetlink.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetlink.h util: remove const specifier from nlmsghdr arg to virNetlinkDumpCallback() 2019-01-10 12:35:43 -05:00
virnodesuspend.c
virnodesuspend.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnuma.c
virnuma.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virobject.c util: Fix misaligned arguments and misaligned conditions for [if|while|...] 2018-09-24 10:02:40 +02:00
virobject.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virpci.c virpci: Fix memleak in virPCIDeviceIterDevices 2019-01-24 10:11:27 +01:00
virpci.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virperf.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virperf.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virpidfile.c
virpidfile.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virpolkit.c
virpolkit.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virportallocator.c virPortAllocatorSetUsed: ignore port 0 2019-01-25 14:50:05 +01:00
virportallocator.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virprobe.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virprocess.c virprocess: Make virProcessRunInMountNamespace use virProcessRunInFork 2018-11-16 13:42:38 +01:00
virprocess.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virqemu.c util: Fix misaligned arguments and misaligned conditions for [if|while|...] 2018-09-24 10:02:40 +02:00
virqemu.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virrandom.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virrandom.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virresctrl.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virresctrl.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virresctrlpriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virrotatingfile.c Drop \n at the end of VIR_DEBUG messages 2018-09-19 14:05:59 +02:00
virrotatingfile.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virscsi.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virscsi.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virscsihost.c
virscsihost.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virscsivhost.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virscsivhost.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virseclabel.c
virseclabel.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsecret.c
virsecret.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsexpr.c src: More cleanup of some system headers already contained in internal.h 2018-09-20 10:16:39 +02:00
virsexpr.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsocketaddr.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virsocketaddr.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virstorageencryption.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virstorageencryption.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virstoragefile.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virstoragefile.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virstoragefilebackend.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virstoragefilebackend.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virstring.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virstring.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsysinfo.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsysinfo.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsysinfopriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsystemd.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsystemd.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsystemdpriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virthread.c
virthread.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virthreadjob.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virthreadjob.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virthreadpool.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virthreadpool.h Remove even more Author(s): lines from source files 2019-01-03 13:24:18 +01:00
virtime.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virtime.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virtpm.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virtpm.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virtypedparam.c
virtypedparam.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
viruri.c util: fix handling of unspecified port in URI 2018-11-14 17:09:41 +00:00
viruri.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virusb.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virusb.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virutil.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virutil.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
viruuid.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
viruuid.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virvhba.c
virvhba.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virvsock.c
virvsock.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virxdrdefs.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virxml.c Remove even more Author(s): lines from source files 2019-01-03 13:24:18 +01:00
virxml.h Remove even more Author(s): lines from source files 2019-01-03 13:24:18 +01:00