Signed-off-by: Laine Stump <laine(a)redhat.com>
---
src/nwfilter/nwfilter_ebiptables_driver.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c
b/src/nwfilter/nwfilter_ebiptables_driver.c
index 8b77578117..cc814235aa 100644
--- a/src/nwfilter/nwfilter_ebiptables_driver.c
+++ b/src/nwfilter/nwfilter_ebiptables_driver.c
@@ -3274,7 +3274,9 @@ ebtablesRuleInstCommand(virFirewallPtr fw,
return ret;
}
-struct ebtablesSubChainInst {
+typedef struct _ebtablesSubChainInst ebtablesSubChainInst;
+typedef ebtablesSubChainInst *ebtablesSubChainInstPtr;
+struct _ebtablesSubChainInst {
virNWFilterChainPriority priority;
bool incoming;
enum l3_proto_idx protoidx;
@@ -3285,8 +3287,8 @@ struct ebtablesSubChainInst {
static int
ebtablesSubChainInstSort(const void *a, const void *b)
{
- const struct ebtablesSubChainInst **insta = (const struct ebtablesSubChainInst **)a;
- const struct ebtablesSubChainInst **instb = (const struct ebtablesSubChainInst **)b;
+ const ebtablesSubChainInst **insta = (const ebtablesSubChainInst **)a;
+ const ebtablesSubChainInst **instb = (const ebtablesSubChainInst **)b;
/* priorities are limited to range [-1000, 1000] */
return (*insta)->priority - (*instb)->priority;
@@ -3296,7 +3298,7 @@ ebtablesSubChainInstSort(const void *a, const void *b)
static int
ebtablesGetSubChainInsts(virHashTablePtr chains,
bool incoming,
- struct ebtablesSubChainInst ***insts,
+ ebtablesSubChainInstPtr **insts,
size_t *ninsts)
{
virHashKeyValuePairPtr filter_names;
@@ -3309,7 +3311,7 @@ ebtablesGetSubChainInsts(virHashTablePtr chains,
return -1;
for (i = 0; filter_names[i].key; i++) {
- struct ebtablesSubChainInst *inst;
+ ebtablesSubChainInstPtr inst;
enum l3_proto_idx idx = ebtablesGetProtoIdxByFiltername(
filter_names[i].key);
@@ -3355,7 +3357,7 @@ ebiptablesApplyNewRules(const char *ifname,
bool haveEbtables = false;
bool haveIptables = false;
bool haveIp6tables = false;
- struct ebtablesSubChainInst **subchains = NULL;
+ ebtablesSubChainInstPtr *subchains = NULL;
size_t nsubchains = 0;
int ret = -1;
--
2.25.4