summaryrefslogtreecommitdiff
path: root/ipsets.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2013-03-10 20:29:48 +0100
committerJo-Philipp Wich <jow@openwrt.org>2013-03-10 20:31:34 +0100
commitc7fc65809ae5300f256a1228f7011a1dc1bc85ac (patch)
tree685b1677101232657c86339c752ec1ea179b998a /ipsets.c
parentcfd25cee8cec398d93b24ff79c2aba0ea81b1670 (diff)
downloadfirewall3-c7fc65809ae5300f256a1228f7011a1dc1bc85ac.tar.gz
Introduce fw3_no_family() helper macro and use it
Diffstat (limited to 'ipsets.c')
-rw-r--r--ipsets.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ipsets.c b/ipsets.c
index d6ff9bd..a987790 100644
--- a/ipsets.c
+++ b/ipsets.c
@@ -376,14 +376,13 @@ void
fw3_destroy_ipsets(struct fw3_state *state, enum fw3_family family)
{
struct fw3_ipset *s, *tmp;
- uint32_t family_mask = (1 << FW3_FAMILY_V4) | (1 << FW3_FAMILY_V6);
list_for_each_entry_safe(s, tmp, &state->running_ipsets, running_list)
{
if (hasbit(s->running_flags, family))
delbit(s->flags, family);
- if (!(s->flags & family_mask))
+ if (fw3_no_family(s))
{
info("Deleting ipset %s", s->name);