]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: rename virNetFilterAction to iptablesAction, and add VIR_ENUM_DECL/IMPL
authorLaine Stump <laine@redhat.com>
Sat, 20 Apr 2024 02:19:42 +0000 (22:19 -0400)
committerLaine Stump <laine@redhat.com>
Thu, 23 May 2024 03:19:18 +0000 (23:19 -0400)
commit67362e63281b2580e5b8e81b7e04614dd7ef3115
tree22c410fb4f7abc339d8e92e80a8d0debd2102777
parent0817344ba761a2cc4ba72d83b3f97958e9f4d38b
util: rename virNetFilterAction to iptablesAction, and add VIR_ENUM_DECL/IMPL

I had originally named these as VIR_NETFILTER_* because I assumed the
same enum would eventually be used by our nftables backend as well as
iptables. But it turns out that in most cases it's not possible to
delete an nftables rule, so we just never used the enum anyway, so
this patch is renaming the values to IPTABLES_ACTION_*, and taking
advantage of the newly defined (via VIR_ENUM_DECL/IMPL)
iptablesActionTypeToString() to replace all the ternary operators used
to translate the enum into a string for the iptables commandline with
iptablesActionTypeToString().

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/network/network_iptables.c