X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=main.c;h=09baca9579e96e1c944080c55dff531f3c9026ca;hb=54c0625e83a5ddf77e1753885c96f488ba38f78a;hp=ad349686b088c21c746b89e46c312f5cfda8286c;hpb=c320b26725989af881bceb13bdefa767cae56e49;p=project%2Ffirewall3.git diff --git a/main.c b/main.c index ad34968..09baca9 100644 --- a/main.c +++ b/main.c @@ -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 ...");