Don't track family of ipsets
[project/firewall3.git] / main.c
diff --git a/main.c b/main.c
index 5580c7d..fc2eb72 100644 (file)
--- a/main.c
+++ b/main.c
@@ -233,20 +233,19 @@ stop(bool complete, bool reload)
                }
 
                fw3_command_close();
+               family_set(run_state, family, false);
+               family_set(cfg_state, family, false);
 
-               if (!reload && run_state)
-               {
-                       if (fw3_command_pipe(false, "ipset", "-exist", "-"))
-                       {
-                               fw3_destroy_ipsets(run_state, family);
-                               fw3_command_close();
-                       }
+               rv = 0;
+       }
 
-                       family_set(run_state, family, false);
-                       family_set(cfg_state, family, false);
+       if (!reload && run_state)
+       {
+               if (fw3_command_pipe(false, "ipset", "-exist", "-"))
+               {
+                       fw3_destroy_ipsets(run_state);
+                       fw3_command_close();
                }
-
-               rv = 0;
        }
 
        if (complete && (ct = fopen("/proc/net/nf_conntrack", "w")) != NULL)