Make nat reflection src address configurable by introducing a reflection_src paramete...
[project/firewall3.git] / ipsets.c
index 2c397b0..48aaa9c 100644 (file)
--- a/ipsets.c
+++ b/ipsets.c
@@ -379,10 +379,9 @@ fw3_destroy_ipsets(struct fw3_state *state, enum fw3_family family)
 
        list_for_each_entry_safe(s, tmp, &state->running_ipsets, running_list)
        {
-               if (hasbit(s->running_flags, family))
-                       delbit(s->flags, family);
+               del(s->flags, family, family);
 
-               if (fw3_no_family(s))
+               if (fw3_no_family(s->flags[family == FW3_FAMILY_V6]))
                {
                        info(" * Deleting ipset %s", s->name);