]> xenbits.xensource.com Git - libvirt.git/commit
Introduce an object for managing firewall rulesets
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 4 Mar 2013 16:30:40 +0000 (16:30 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 25 Apr 2014 14:44:09 +0000 (15:44 +0100)
commit3a0ca7de51030ba4999c9ae19ab82ebf41f4e2ab
tree093f8aa027a1b62047d0706d84ef77ebb15d115c
parent89f244ba7c305e4193d1d7c860ef0c3fba579603
Introduce an object for managing firewall rulesets

The network and nwfilter drivers both have a need to update
firewall rules. The currently share no code for interacting
with iptables / firewalld. The nwfilter driver is fairly
tied to the concept of creating shell scripts to execute
which makes it very hard to port to talk to firewalld via
DBus APIs.

This patch introduces a virFirewallPtr object which is able
to represent a complete sequence of rule changes, with the
ability to have multiple transactional checkpoints with
rollbacks. By formally separating the definition of the rules
to be applied from the mechanism used to apply them, it is
also possible to write a firewall engine that uses firewalld
DBus APIs natively instead of via the slow firewalld-cmd.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
include/libvirt/virterror.h
po/POTFILES.in
src/Makefile.am
src/libvirt_private.syms
src/util/virerror.c
src/util/virfirewall.c [new file with mode: 0644]
src/util/virfirewall.h [new file with mode: 0644]
src/util/virfirewallpriv.h [new file with mode: 0644]
tests/Makefile.am
tests/testutils.c
tests/virfirewalltest.c [new file with mode: 0644]