]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Remove use of virConnectPtr from all remaining nwfilter code
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 3 Oct 2013 11:51:48 +0000 (12:51 +0100)
committerLaine Stump <laine@laine.org>
Thu, 6 Feb 2014 13:33:26 +0000 (15:33 +0200)
commit636f78d38e74e482c9f6bb50e74d917760199033
tree474763b311bec6ade02e73ff7954a2094258fe2f
parent979a3a95315cb7800002571234e7d8e06ab3dc51
Remove use of virConnectPtr from all remaining nwfilter code

The virConnectPtr is passed around loads of nwfilter code in
order to provide it as a parameter to the callback registered
by the virt drivers. None of the virt drivers use this param
though, so it serves no purpose.

Avoiding the need to pass a virConnectPtr means that the
nwfilterStateReload method no longer needs to open a bogus
QEMU driver connection. This addresses a race condition that
can lead to a crash on startup.

The nwfilter driver starts before the QEMU driver and registers
some callbacks with DBus to detect firewalld reload. If the
firewalld reload happens while the QEMU driver is still starting
up though, the nwfilterStateReload method will open a connection
to the partially initialized QEMU driver and cause a crash.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 999d72fbd59ea712128ae294b69b6a54039d757b)

Conflicts:
  src/nwfilter/nwfilter_driver.c
    - *EnsureACL*() was added after this branch was created, and
       caused two small conflicts in the context around a hunk.
    - nwfilterDriverReload() was renamed to nwfilterStateReload()
      upstream.
src/conf/nwfilter_conf.c
src/conf/nwfilter_conf.h
src/lxc/lxc_driver.c
src/nwfilter/nwfilter_driver.c
src/qemu/qemu_driver.c
src/uml/uml_driver.c