C(ANY, FILTER, UNSPEC, "zone_%1$s_output"),
C(ANY, FILTER, UNSPEC, "zone_%1$s_forward"),
- C(ANY, FILTER, ACCEPT, "zone_%1$s_src_ACCEPT"),
- C(ANY, FILTER, REJECT, "zone_%1$s_src_REJECT"),
- C(ANY, FILTER, DROP, "zone_%1$s_src_DROP"),
+ C(ANY, FILTER, SRC_ACCEPT, "zone_%1$s_src_ACCEPT"),
+ C(ANY, FILTER, SRC_REJECT, "zone_%1$s_src_REJECT"),
+ C(ANY, FILTER, SRC_DROP, "zone_%1$s_src_DROP"),
};
static const struct chain dst_chains[] = {
setbit(zone->dst_flags, FW3_TARGET_DNAT);
}
- setbit(zone->src_flags, zone->policy_input);
+ setbit(zone->dst_flags, fw3_to_src_target(zone->policy_input));
setbit(zone->dst_flags, zone->policy_output);
setbit(zone->dst_flags, zone->policy_forward);
setbit(zone->dst_flags, FW3_TARGET_NOTRACK);
s = print_chains(table, family, ":%s - [0:0]\n", zone->name,
- zone->src_flags,
+ zone->dst_flags,
src_chains, ARRAY_SIZE(src_chains));
d = print_chains(table, family, ":%s - [0:0]\n", zone->name,
{
for (t = FW3_TARGET_ACCEPT; t <= FW3_TARGET_DROP; t++)
{
- if (hasbit(zone->src_flags, t))
+ if (hasbit(zone->dst_flags, fw3_to_src_target(t)))
{
fw3_pr("-A zone_%s_src_%s", zone->name, fw3_flag_names[t]);
fw3_format_in_out(dev, NULL);
{
for (t = FW3_TARGET_REJECT; t <= FW3_TARGET_DROP; t++)
{
- if (hasbit(zone->src_flags, t))
+ if (hasbit(zone->dst_flags, fw3_to_src_target(t)))
{
fw3_pr("-A zone_%s_src_%s", zone->name, fw3_flag_names[t]);
fw3_format_limit(&zone->log_limit);
continue;
print_chains(table, family, pass2 ? "-X %s\n" : "-F %s\n",
- z->name, z->running_src_flags,
+ z->name, z->running_dst_flags,
src_chains, ARRAY_SIZE(src_chains));
print_chains(table, family, pass2 ? "-X %s\n" : "-F %s\n",