projects
/
oweals
/
firewall3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f0b781
)
clear conntrack table on flush
author
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 27 Feb 2013 13:49:09 +0000
(14:49 +0100)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 27 Feb 2013 13:49:09 +0000
(14:49 +0100)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index 1135c50c758e045d904de073bc86041866934141..79d3b0b37acc7b2b33e4ff4ecf1373e5d9807a21 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-162,6
+162,8
@@
family_set(struct fw3_state *state, enum fw3_family family, bool set)
static int
stop(struct fw3_state *state, bool complete, bool reload)
{
+ FILE *ct;
+
int rv = 1;
enum fw3_family family;
enum fw3_table table;
@@
-228,6
+230,14
@@
stop(struct fw3_state *state, bool complete, bool reload)
fw3_command_close();
}
+ if (complete && (ct = fopen("/proc/net/nf_conntrack", "w")) != NULL)
+ {
+ info("Flushing conntrack table ...");
+
+ fwrite("f\n", 2, 1, ct);
+ fclose(ct);
+ }
+
if (!rv)
fw3_write_statefile(state);