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:
8e3a863
)
Further fixes for zone reloads
author
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 22 May 2013 10:09:49 +0000
(12:09 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 22 May 2013 11:22:21 +0000
(13:22 +0200)
defaults.c
patch
|
blob
|
history
zones.c
patch
|
blob
|
history
diff --git
a/defaults.c
b/defaults.c
index
c025359
..
ec95ec9
100644
(file)
--- a/
defaults.c
+++ b/
defaults.c
@@
-416,8
+416,7
@@
fw3_flush_rules(struct fw3_ipt_handle *handle, struct fw3_state *state,
if (c->table != handle->table)
continue;
if (c->table != handle->table)
continue;
- if (c->flag &&
- !hasbit(defs->flags[handle->family == FW3_FAMILY_V6], c->flag))
+ if (c->flag && !has(defs->flags, handle->family, c->flag))
continue;
fw3_ipt_delete_rules(handle, c->format);
continue;
fw3_ipt_delete_rules(handle, c->format);
diff --git
a/zones.c
b/zones.c
index
979d150
..
3d3812c
100644
(file)
--- a/
zones.c
+++ b/
zones.c
@@
-574,7
+574,7
@@
fw3_flush_zones(struct fw3_ipt_handle *handle, struct fw3_state *state,
for (c = zone_chains; c->format; c++)
{
/* don't touch user chains on selective stop */
for (c = zone_chains; c->format; c++)
{
/* don't touch user chains on selective stop */
- if (reload &&
hasbit(c->flag, FW3_FLAG_CUSTOM_CHAINS)
)
+ if (reload &&
c->flag == FW3_FLAG_CUSTOM_CHAINS
)
continue;
if (!fw3_is_family(c, handle->family))
continue;
if (!fw3_is_family(c, handle->family))
@@
-583,6
+583,9
@@
fw3_flush_zones(struct fw3_ipt_handle *handle, struct fw3_state *state,
if (c->table != handle->table)
continue;
if (c->table != handle->table)
continue;
+ if (c->flag && !has(z->flags, handle->family, c->flag))
+ continue;
+
snprintf(chain, sizeof(chain), c->format, z->name);
fw3_ipt_delete_rules(handle, chain);
fw3_ipt_delete_chain(handle, chain);
snprintf(chain, sizeof(chain), c->format, z->name);
fw3_ipt_delete_rules(handle, chain);
fw3_ipt_delete_chain(handle, chain);