projects
/
project
/
firewall3.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduce fw3_no_family() helper macro and use it
[project/firewall3.git]
/
main.c
diff --git
a/main.c
b/main.c
index
cd821fc
..
09baca9
100644
(file)
--- 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)
{
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
}
static bool
@@
-219,17
+219,19
@@
stop(struct fw3_state *state, bool complete, bool reload)
fw3_command_close();
if (!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);
family_set(state, family, false);
+ }
rv = 0;
}
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 ...");
if (complete && (ct = fopen("/proc/net/nf_conntrack", "w")) != NULL)
{
info("Flushing conntrack table ...");