struct uci_section *s;
struct uci_element *e;
struct fw3_forward *forward;
- bool changed;
INIT_LIST_HEAD(&state->forwards);
continue;
}
- /* Propagate conntrack requirement flag into all zones connected through
- forwarding entries and repeat until all zones are normalized */
- do {
- changed = false;
-
- list_for_each_entry(forward, &state->forwards, list)
+ list_for_each_entry(forward, &state->forwards, list)
+ {
+ /* NB: forward family... */
+ if (forward->_dest)
{
- /* NB: forward family... */
- if (forward->_dest)
- {
- fw3_setbit(forward->_dest->flags[0], FW3_FLAG_ACCEPT);
- fw3_setbit(forward->_dest->flags[1], FW3_FLAG_ACCEPT);
-
- if (forward->_src &&
- (forward->_src->conntrack != forward->_dest->conntrack))
- {
- forward->_src->conntrack = true;
- forward->_dest->conntrack = true;
- changed = true;
- }
- }
+ fw3_setbit(forward->_dest->flags[0], FW3_FLAG_ACCEPT);
+ fw3_setbit(forward->_dest->flags[1], FW3_FLAG_ACCEPT);
}
}
- while (changed);
}
else
{
set(redir->_src->flags, FW3_FAMILY_V4, redir->target);
- redir->_src->conntrack = true;
valid = true;
if (!check_local(e, redir, state) && !redir->dest.set &&
else
{
set(redir->_dest->flags, FW3_FAMILY_V4, redir->target);
- redir->_dest->conntrack = true;
valid = true;
}
}
FW3_OPT("extra_src", string, zone, extra_src),
FW3_OPT("extra_dest", string, zone, extra_dest),
- FW3_OPT("conntrack", bool, zone, conntrack),
FW3_OPT("mtu_fix", bool, zone, mtu_fix),
FW3_OPT("custom_chains", bool, zone, custom_chains),
if (zone->masq)
{
fw3_setbit(zone->flags[0], FW3_FLAG_SNAT);
- zone->conntrack = true;
}
if (zone->custom_chains)
if (zone->custom_chains)
set(zone->flags, handle->family, FW3_FLAG_CUSTOM_CHAINS);
- if (!zone->conntrack && !state->defaults.drop_invalid)
- set(zone->flags, handle->family, FW3_FLAG_NOTRACK);
-
for (c = zone_chains; c->format; c++)
{
/* don't touch user chains on selective stop */
print_zone_rule(struct fw3_ipt_handle *handle, struct fw3_state *state,
bool reload, struct fw3_zone *zone)
{
- bool disable_notrack = state->defaults.drop_invalid;
bool first_src, first_dest;
struct fw3_address *msrc;
struct fw3_address *mdest;
break;
case FW3_TABLE_RAW:
- if (!zone->conntrack && !disable_notrack)
- {
- r = fw3_ipt_rule_new(handle);
- fw3_ipt_rule_target(r, "CT");
- fw3_ipt_rule_addarg(r, false, "--notrack", NULL);
- fw3_ipt_rule_append(r, "zone_%s_notrack", zone->name);
- }
- break;
-
case FW3_TABLE_MANGLE:
break;
}