]> 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 11:06:07 +0000 (13:06 +0200)
commit64a9166b4b9d0141ac085f79173e46fc4c7f2449
treea5ba955fb5979b26d03cdd3cece043c31d37b098
parent9d30a7489b1976cbb68ea569ffc3ef65889f597c
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)
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