projects
/
project
/
firewall3.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Force fsync() after writing statefile
[project/firewall3.git]
/
zones.c
diff --git
a/zones.c
b/zones.c
index
0306a0c
..
b0fcaee
100644
(file)
--- a/
zones.c
+++ b/
zones.c
@@
-132,7
+132,7
@@
resolve_networks(struct uci_element *e, struct fw3_zone *zone)
continue;
}
continue;
}
-
tmp->network = net
;
+
snprintf(tmp->network, sizeof(tmp->network), "%s", net->name)
;
list_add_tail(&tmp->list, &zone->devices);
}
}
list_add_tail(&tmp->list, &zone->devices);
}
}
@@
-487,8
+487,7
@@
fw3_print_zone_chains(struct fw3_state *state, enum fw3_family family,
struct fw3_zone *zone;
list_for_each_entry(zone, &state->zones, list)
struct fw3_zone *zone;
list_for_each_entry(zone, &state->zones, list)
- if (!hasbit(zone->flags[0], FW3_FLAG_DELETED))
- print_zone_chain(state, family, table, reload, zone);
+ print_zone_chain(state, family, table, reload, zone);
}
void
}
void
@@
-498,8
+497,7
@@
fw3_print_zone_rules(struct fw3_state *state, enum fw3_family family,
struct fw3_zone *zone;
list_for_each_entry(zone, &state->zones, list)
struct fw3_zone *zone;
list_for_each_entry(zone, &state->zones, list)
- if (!hasbit(zone->flags[0], FW3_FLAG_DELETED))
- print_zone_rule(state, family, table, reload, zone);
+ print_zone_rule(state, family, table, reload, zone);
}
void
}
void
@@
-532,36
+530,23
@@
fw3_hotplug_zones(struct fw3_state *state, bool add)
struct fw3_zone *z;
struct fw3_device *d;
struct fw3_zone *z;
struct fw3_device *d;
-
if (add
)
+
list_for_each_entry(z, &state->zones, list
)
{
{
-
list_for_each_entry(z, &state->zones, list
)
+
if (add != hasbit(z->flags[0], FW3_FLAG_HOTPLUG)
)
{
{
- if (!hasbit(z->flags[0], FW3_FLAG_HOTPLUG))
- {
- list_for_each_entry(d, &z->devices, list)
- fw3_hotplug(add, z, d);
+ list_for_each_entry(d, &z->devices, list)
+ fw3_hotplug(add, z, d);
+ if (add)
setbit(z->flags[0], FW3_FLAG_HOTPLUG);
setbit(z->flags[0], FW3_FLAG_HOTPLUG);
- }
- }
- }
- else
- {
- list_for_each_entry(z, &state->zones, list)
- {
- if (hasbit(z->flags[0], FW3_FLAG_HOTPLUG))
- {
- list_for_each_entry(d, &z->devices, list)
- fw3_hotplug(add, z, d);
-
+ else
delbit(z->flags[0], FW3_FLAG_HOTPLUG);
delbit(z->flags[0], FW3_FLAG_HOTPLUG);
- }
}
}
}
struct fw3_zone *
}
}
}
struct fw3_zone *
-fw3_lookup_zone(struct fw3_state *state, const char *name
, bool running
)
+fw3_lookup_zone(struct fw3_state *state, const char *name)
{
struct fw3_zone *z;
{
struct fw3_zone *z;