X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffirewall3.git;a=blobdiff_plain;f=main.c;h=09baca9579e96e1c944080c55dff531f3c9026ca;hp=cd821fcd8dadb3d2be9e7f8211e75de4ec243d16;hb=c7fc65809ae5300f256a1228f7011a1dc1bc85ac;hpb=b2b2e69b19a20a46f3db6d717a899248fa24628c diff --git a/main.c b/main.c index cd821fc..09baca9 100644 --- a/main.c +++ b/main.c @@ -135,7 +135,7 @@ restore_pipe(enum fw3_family family, bool silent) static bool family_running(struct fw3_state *state, enum fw3_family family) { - return hasbit(state->running_defaults.flags, family); + return hasbit(state->defaults.running_flags, family); } static bool @@ -219,17 +219,19 @@ stop(struct fw3_state *state, bool complete, bool reload) fw3_command_close(); if (!reload) + { + if (fw3_command_pipe(false, "ipset", "-exist", "-")) + { + fw3_destroy_ipsets(state, family); + fw3_command_close(); + } + family_set(state, family, false); + } rv = 0; } - if (!reload && fw3_command_pipe(false, "ipset", "-exist", "-")) - { - fw3_destroy_ipsets(state); - fw3_command_close(); - } - if (complete && (ct = fopen("/proc/net/nf_conntrack", "w")) != NULL) { info("Flushing conntrack table ...");