]> 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:48:21 +0000 (15:48 +0200)
commite57db9525390a314ca44bf56bceb407f53fbd8d2
treecf4c51d9ffae26f7e51cd5addfb74f6ffa23a84e
parent27465d9c1f0cf5c4818ec27a43d715ba335ce7c5
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