libvirt/src
Laine Stump 2f82fe467f network: add private chains only if there are networks adding iptables rules
Juan Quintela noticed that when he restarted libvirt he was getting
extra iptables rules added by libvirt even though he didn't have any
libvirt networks that used iptables rules. It turns out this also
happens if the firewalld service is restarted. The extra rules are
just the private chains, and they're sometimes being added
unnecessarily because they are added separately in a global
networkPreReloadFirewallRules() that does the init if there are any
active networks, regardless of whether or not any of those networks
will actually add rules to the host firewall.

The fix is to change the check for "any active networks" to instead
check for "any active networks that add firewall rules".

(NB: although the timing seems suspicious, this isn't a new regression
caused by the recently pushed f5418b427 (which forces recreation of
private chains when firewalld is restarted); it was an existing bug
since iptables rules were first put into private chains, even after
commit c6cbe18771 delayed creation of the private chains. The
implication is that any downstream based on v5.1.0 or later that cares
about these extraneous (but harmless) private chains would want to
backport this patch (along with the other two if they aren't already
there))

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-06-08 23:06:36 -04:00
..
access Remove virutil.h from all header files 2020-02-24 23:15:50 +01:00
admin src: don't include ref count in debug messages / probes 2020-06-03 10:20:17 +01:00
bhyve bhyve: add missing param to virDomainPCIAddressBusSetModel 2020-04-16 15:49:28 +01:00
conf conf: fix alignment in virObjectEvent to be 8 not 4 bytes 2020-06-04 11:17:05 +01:00
cpu Use more of VIR_XPATH_NODE_AUTORESTORE 2020-06-03 21:06:02 +02:00
cpu_map cpu_map: Distribute x86_Cooperlake.xml 2020-05-26 13:42:44 +02:00
esx virsh: include virutil.h where used 2020-02-24 23:15:50 +01:00
hyperv
hypervisor virDomainDriverGenerateMachineName: Factor out embed path hashing 2020-04-07 15:26:22 +02:00
interface src: make virObjectUnref return void 2020-06-03 10:20:17 +01:00
keycodemapdb@27acf0ef82 keycodemapdb: update submodule for win32 keycode fix 2020-05-07 12:18:29 +01:00
libxl libxl: Normalize MAC address in device conf when hotplugging a netdev 2020-06-03 09:07:51 -06:00
locking lib: Drop needless ret variables 2020-05-05 13:08:53 +02:00
logging lib: Drop needless ret variables 2020-05-05 13:08:53 +02:00
lxc Use more of VIR_XPATH_NODE_AUTORESTORE 2020-06-03 21:06:02 +02:00
network network: add private chains only if there are networks adding iptables rules 2020-06-08 23:06:36 -04:00
node_device udevHandleOneDevice: Remove old instance of device on "move" 2020-04-22 12:51:15 +02:00
nwfilter src: Fix boolean assignment 2020-05-05 13:08:57 +02:00
openvz openvz: switch from virRun to virCommand 2020-04-23 12:49:30 +02:00
qemu qemu: fix typo s/readaehad/readahead/ 2020-06-05 13:33:00 +01:00
remote systemd: start libvirtd after firewalld/iptables services 2020-05-05 20:16:02 -04:00
rpc src: don't use VIR_FREE on an object allocation 2020-06-03 10:20:17 +01:00
secret systemd: Move timeout from service files to sysconf files 2020-04-03 11:50:50 +02:00
security security: don't fail if built without attr support 2020-05-27 11:22:50 +02:00
storage storage_file: create: Create new images with write permission bit 2020-05-12 06:56:09 +02:00
test test: allocate numa cells separately from driver 2020-06-03 10:20:17 +01:00
util Use more of VIR_XPATH_NODE_AUTORESTORE 2020-06-03 21:06:02 +02:00
vbox src: make virObjectUnref return void 2020-06-03 10:20:17 +01:00
vmware vmware: use virCommand instead of virRun 2020-04-23 12:49:30 +02:00
vmx src: Fix boolean assignment 2020-05-05 13:08:57 +02:00
vz systemd: Move timeout from service files to sysconf files 2020-04-03 11:50:50 +02:00
admin_protocol-structs admin: Introduce virAdmServerUpdateTlsFiles 2020-03-13 17:07:32 +00:00
datatypes.c src: make virObjectUnref return void 2020-06-03 10:20:17 +01:00
datatypes.h src: make virObjectUnref return void 2020-06-03 10:20:17 +01:00
driver-hypervisor.h
driver-interface.h
driver-network.h
driver-nodedev.h
driver-nwfilter.h
driver-secret.h
driver-state.h
driver-storage.h
driver-stream.h
driver.c driver: Yet 1 more g_autofree conversion change 2020-04-14 15:36:53 +02:00
driver.h
internal.h
libvirt_driver_modules.syms
libvirt_esx.syms
libvirt_internal.h
libvirt_libssh2.syms
libvirt_libssh.syms
libvirt_linux.syms
libvirt_lxc.syms
libvirt_openvz.syms
libvirt_private.syms hostcpu: Introduce virHostCPUGetSignature 2020-05-25 16:09:41 +02:00
libvirt_probes.d
libvirt_public.syms
libvirt_qemu_probes.d src: don't include ref count in debug messages / probes 2020-06-03 10:20:17 +01:00
libvirt_qemu.syms
libvirt_remote.syms virnetserver: Introduce virNetServerUpdateTlsFiles 2020-03-13 17:07:32 +00:00
libvirt_sasl.syms
libvirt_vmware.syms
libvirt_vmx.syms
libvirt-domain-checkpoint.c src: don't include ref count in debug messages / probes 2020-06-03 10:20:17 +01:00
libvirt-domain-snapshot.c src: don't include ref count in debug messages / probes 2020-06-03 10:20:17 +01:00
libvirt-domain.c src: don't include ref count in debug messages / probes 2020-06-03 10:20:17 +01:00
libvirt-host.c src: don't include ref count in debug messages / probes 2020-06-03 10:20:17 +01:00
libvirt-interface.c src: don't include ref count in debug messages / probes 2020-06-03 10:20:17 +01:00
libvirt-lxc.c
libvirt-lxc.pc.in
libvirt-network.c src: don't include ref count in debug messages / probes 2020-06-03 10:20:17 +01:00
libvirt-nodedev.c src: don't include ref count in debug messages / probes 2020-06-03 10:20:17 +01:00
libvirt-nwfilter.c src: don't include ref count in debug messages / probes 2020-06-03 10:20:17 +01:00
libvirt-qemu.c
libvirt-qemu.pc.in
libvirt-secret.c src: don't include ref count in debug messages / probes 2020-06-03 10:20:17 +01:00
libvirt-storage.c src: don't include ref count in debug messages / probes 2020-06-03 10:20:17 +01:00
libvirt-stream.c src: don't include ref count in debug messages / probes 2020-06-03 10:20:17 +01:00
libvirt.c src: make virObjectUnref return void 2020-06-03 10:20:17 +01:00
libvirt.conf
libvirt.pc.in
lock_protocol-structs
lxc_monitor_protocol-structs
lxc_protocol-structs
Makefile.am
qemu_protocol-structs
README
remote_protocol-structs
virkeepaliveprotocol-structs
virnetprotocol-structs

       libvirt library code README
       ===========================

The directory provides the bulk of the libvirt codebase. Everything
except for the libvirtd daemon and client tools. The build uses a
large number of libtool convenience libraries - one for each child
directory, and then links them together for the final libvirt.so,
although some bits get linked directly to libvirtd daemon instead.

The files directly in this directory are supporting the public API
entry points & data structures.

There are two core shared modules to be aware of:

 * util/  - a collection of shared APIs that can be used by any
            code. This directory is always in the include path
            for all things built

 * conf/  - APIs for parsing / manipulating all the official XML
            files used by the public API. This directory is only
            in the include path for driver implementation modules

 * vmx/   - VMware VMX config handling (used by esx/ and vmware/)


Then there are the hypervisor implementations:

 * bhyve         - bhyve - The BSD Hypervisor
 * esx/          - VMware ESX and GSX support using vSphere API over SOAP
 * hyperv/       - Microsoft Hyper-V support using WinRM
 * lxc/          - Linux Native Containers
 * openvz/       - OpenVZ containers using cli tools
 * qemu/         - QEMU / KVM using qemu CLI/monitor
 * remote/       - Generic libvirt native RPC client
 * test/         - A "mock" driver for testing
 * vbox/         - Virtual Box using native API
 * vmware/       - VMware Workstation and Player using the vmrun tool
 * xen/          - Xen using hypercalls, XenD SEXPR & XenStore


Finally some secondary drivers that are shared for several HVs.
Currently these are used by LXC, OpenVZ, QEMU and Xen drivers.
The ESX, Hyper-V, Remote, Test & VirtualBox drivers all
implement the secondary drivers directly

 * cpu/          - CPU feature management
 * interface/    - Host network interface management
 * network/      - Virtual NAT networking
 * nwfilter/     - Network traffic filtering rules
 * node_device/  - Host device enumeration
 * secret/       - Secret management
 * security/     - Mandatory access control drivers
 * storage/      - Storage management drivers


Since both the hypervisor and secondary drivers can be built as
dlopen()able modules, it is *FORBIDDEN* to have build dependencies
between these directories. Drivers are only allowed to depend on
the public API, and the internal APIs in the util/ and conf/
directories