]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: avoid trying to create global firewall rules if unprivileged
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 13 Mar 2019 16:21:15 +0000 (16:21 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 19 Mar 2019 10:03:02 +0000 (10:03 +0000)
commit5d010c3df6152cf5fb00f1f67d22151241f4a8a2
tree7fa28dc16e42bcf27d76fdfec2ba42ea2651078a
parent686803a1a2e1e0641916b1c9e2c7e3910fe598d4
network: avoid trying to create global firewall rules if unprivileged

The unprivileged libvirtd does not have permission to create firewall
rules, or bridge devices, or do anything to the host network in
general. Historically we still activate the network driver though and
let the network start API call fail.

The startup code path which reloads firewall rules on active networks
would thus effectively be a no-op when unprivileged as it is impossible
for there to be any active networks

With the change to use a global set of firewall chains, however, we now
have code that is run unconditionally.

Ideally we would not register the network driver at all when
unprivileged, but the entanglement with the virt drivers currently makes
that impractical. As a temporary hack, we just make the firewall reload
into a no-op.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/network/bridge_driver.c