]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Use scripting for cleaning and renaming of chains
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Fri, 18 Nov 2011 16:58:17 +0000 (11:58 -0500)
committerStefan Berger <stefanb@us.ibm.com>
Fri, 18 Nov 2011 16:58:17 +0000 (11:58 -0500)
commit4a410218a0f5506429f890ae0f8ce2e81d99efd8
tree21c19331ae11583e619ab5077ac81cfecad62512
parentbe39b3e4a5d535935f23d413b409aa9868a560ad
Use scripting for cleaning and renaming of chains

Use scripts for the renaming and cleaning up of chains. This allows us to get
rid of some of the code that is only capable of renaming and removing chains
whose names are hardcoded.

A shell function 'collect_chains' is introduced that is given the name
of an ebtables chain and then recursively determines the names of all
chains that are accessed from this chain and its sub-chains using 'jumps'.

The resulting list of chain names is then used to delete all the found
chains by first flushing and then deleting them.

The same function is also used for renaming temporary filters to their final
names.

I tested this with the bash and dash as script interpreters.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
src/nwfilter/nwfilter_ebiptables_driver.c