Only run includes and set sysctls if either v4 or v6 firewall was actually started
[project/firewall3.git] / utils.c
diff --git a/utils.c b/utils.c
index ce9049e..2747a85 100644 (file)
--- a/utils.c
+++ b/utils.c
@@ -441,9 +441,7 @@ fw3_write_statefile(void *state)
        struct fw3_zone *z;
        struct fw3_ipset *i;
 
-       int mask = (1 << FW3_FAMILY_V4) | (1 << FW3_FAMILY_V6);
-
-       if (!(d->flags & mask))
+       if (fw3_no_family(d))
        {
                if (unlink(FW3_STATEFILE))
                        warn("Unable to remove state %s: %s",