]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nwfilter: Check for filter presence before open connect during teardown
authorJohn Ferlan <jferlan@redhat.com>
Mon, 27 Aug 2018 14:39:39 +0000 (10:39 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 6 Sep 2018 22:38:22 +0000 (18:38 -0400)
commitdbfe8acae5058d07243bed424afbcfaea06ee41e
tree8c04dbd250b1d77c0a42799a3bd68feaf06489b8
parente773e1cbbc5a38da7579de4c9c15f9a8e4b7c8d3
nwfilter: Check for filter presence before open connect during teardown

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

Instantiation of an nwfilter binding is only allowed when
the net->filter is defined for the network; however, the
teardown of the binding does not make this check. This
leaves open the possibility that the teardown could be
called during guest shutdown/teardown in session mode
resulting in the following error being logged:

    error : nwfilterConnectOpen:383 : internal error: unexpected
    nwfilter URI path '/session', try nwfilter:///system

So before going through the teardown processing, let's
be sure the network had a filter and then attempt to
get a connection. For session mode it's not even possible
create an nwfilter binding.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/conf/domain_nwfilter.c