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:
608e5b8
)
run/load includes on start
author
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 22 Feb 2013 12:32:12 +0000
(13:32 +0100)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 22 Feb 2013 12:38:43 +0000
(13:38 +0100)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
e917963
..
6eb002f
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-234,13
+234,13
@@
stop(struct fw3_state *state, bool complete, bool restart)
}
static int
}
static int
-start(struct fw3_state *state, bool re
start
)
+start(struct fw3_state *state, bool re
load
)
{
int rv = 1;
enum fw3_family family;
enum fw3_table table;
{
int rv = 1;
enum fw3_family family;
enum fw3_table table;
- if (!print_rules && !re
start
&&
+ if (!print_rules && !re
load
&&
fw3_command_pipe(false, "ipset", "-exist", "-"))
{
fw3_create_ipsets(state);
fw3_command_pipe(false, "ipset", "-exist", "-"))
{
fw3_create_ipsets(state);
@@
-252,7
+252,7
@@
start(struct fw3_state *state, bool restart)
if (!family_used(family))
continue;
if (!family_used(family))
continue;
- if (!print_rules && !re
start
&& family_running(state, family))
+ if (!print_rules && !re
load
&& family_running(state, family))
{
warn("The %s firewall appears to be started already. "
"If it is indeed empty, remove the %s file and retry.",
{
warn("The %s firewall appears to be started already. "
"If it is indeed empty, remove the %s file and retry.",
@@
-285,12
+285,18
@@
start(struct fw3_state *state, bool restart)
fw3_pr("COMMIT\n");
}
fw3_pr("COMMIT\n");
}
+ if (!reload)
+ fw3_print_includes(family, state);
+
fw3_command_close();
family_set(state, family, true);
rv = 0;
}
fw3_command_close();
family_set(state, family, true);
rv = 0;
}
+ if (!reload && !print_rules)
+ fw3_run_includes(state);
+
if (!rv && !print_rules)
fw3_write_statefile(state);
if (!rv && !print_rules)
fw3_write_statefile(state);