projects
/
project
/
firewall3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c7fc658
)
Only run includes and set sysctls if either v4 or v6 firewall was actually started
author
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 10 Mar 2013 19:36:33 +0000
(20:36 +0100)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 10 Mar 2013 19:36:33 +0000
(20:36 +0100)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
09baca9
..
3654c15
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-255,8
+255,6
@@
start(struct fw3_state *state, bool reload)
if (!print_rules && !reload)
{
if (!print_rules && !reload)
{
- fw3_set_defaults(state);
-
if (fw3_command_pipe(false, "ipset", "-exist", "-"))
{
fw3_create_ipsets(state);
if (fw3_command_pipe(false, "ipset", "-exist", "-"))
{
fw3_create_ipsets(state);
@@
-311,11
+309,16
@@
start(struct fw3_state *state, bool reload)
rv = 0;
}
rv = 0;
}
- if (!reload && !print_rules)
- fw3_run_includes(state);
+ if (!rv)
+ {
+ fw3_set_defaults(state);
+
+ if (!reload && !print_rules)
+ fw3_run_includes(state);
- if (!rv && !print_rules)
- fw3_write_statefile(state);
+ if (!print_rules)
+ fw3_write_statefile(state);
+ }
return rv;
}
return rv;
}