X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffirewall3.git;a=blobdiff_plain;f=main.c;h=65de9f5537b2bbc16e5495cd8a9d7011adf243eb;hp=6eb002f4dad717437cc6b218f63a9db0904d756f;hb=99499fdbe5221847288a6d18edf1032d2702cff9;hpb=83ff4b94b044086d80b1e189e5601274bd5b4852 diff --git a/main.c b/main.c index 6eb002f..65de9f5 100644 --- a/main.c +++ b/main.c @@ -240,11 +240,15 @@ start(struct fw3_state *state, bool reload) enum fw3_family family; enum fw3_table table; - if (!print_rules && !reload && - fw3_command_pipe(false, "ipset", "-exist", "-")) + if (!print_rules && !reload) { - fw3_create_ipsets(state); - fw3_command_close(); + fw3_set_defaults(state); + + if (fw3_command_pipe(false, "ipset", "-exist", "-")) + { + fw3_create_ipsets(state); + fw3_command_close(); + } } for (family = FW3_FAMILY_V4; family <= FW3_FAMILY_V6; family++)