Replace fw3_free_zone() with the generic implementation
[project/firewall3.git] / defaults.c
index d1c5e2c..ec95ec9 100644 (file)
@@ -243,7 +243,7 @@ fw3_print_default_head_rules(struct fw3_ipt_handle *handle,
                        {
                                r = fw3_ipt_rule_new(handle);
                                fw3_ipt_rule_comment(r, "user chain for %s", chains[i+1]);
-                               fw3_ipt_rule_target(r, chains[i+1]);
+                               fw3_ipt_rule_target(r, "%s_rule", chains[i+1]);
                                fw3_ipt_rule_append(r, chains[i]);
                        }
                }
@@ -416,8 +416,7 @@ fw3_flush_rules(struct fw3_ipt_handle *handle, struct fw3_state *state,
                if (c->table != handle->table)
                        continue;
 
-               if (c->flag &&
-                   !hasbit(defs->flags[handle->family == FW3_FAMILY_V6], c->flag))
+               if (c->flag && !has(defs->flags, handle->family, c->flag))
                        continue;
 
                fw3_ipt_delete_rules(handle, c->format);