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);
for (c = zone_chains; c->format; c++)
{
/* don't touch user chains on selective stop */
- if (reload && hasbit(c->flag, FW3_FLAG_CUSTOM_CHAINS))
+ if (reload && c->flag == FW3_FLAG_CUSTOM_CHAINS)
continue;
if (!fw3_is_family(c, handle->family))
if (c->table != handle->table)
continue;
+ if (c->flag && !has(z->flags, handle->family, c->flag))
+ continue;
+
snprintf(chain, sizeof(chain), c->format, z->name);
fw3_ipt_delete_rules(handle, chain);
fw3_ipt_delete_chain(handle, chain);