FW3_TARGET_NOTRACK = 9,
FW3_TARGET_DNAT = 10,
FW3_TARGET_SNAT = 11,
- FW3_TARGET_CUSTOM_CNS_V4 = 12,
- FW3_TARGET_CUSTOM_CNS_V6 = 13,
+ FW3_TARGET_SRC_ACCEPT = 12,
+ FW3_TARGET_SRC_REJECT = 13,
+ FW3_TARGET_SRC_DROP = 14,
+ FW3_TARGET_CUSTOM_CNS_V4 = 15,
+ FW3_TARGET_CUSTOM_CNS_V6 = 16,
};
enum fw3_default
{
FW3_DEFAULT_UNSPEC = 0,
- FW3_DEFAULT_CUSTOM_CHAINS = 14,
- FW3_DEFAULT_SYN_FLOOD = 15,
- FW3_DEFAULT_MTU_FIX = 16,
- FW3_DEFAULT_DROP_INVALID = 17,
+ FW3_DEFAULT_CUSTOM_CHAINS = 17,
+ FW3_DEFAULT_SYN_FLOOD = 18,
+ FW3_DEFAULT_MTU_FIX = 19,
+ FW3_DEFAULT_DROP_INVALID = 20,
};
extern const char *fw3_flag_names[FW3_DEFAULT_DROP_INVALID + 1];
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",