for (table = FW3_TABLE_FILTER; table <= FW3_TABLE_RAW; table++)
{
- if (!fw3_has_table(family == FW3_FAMILY_V6, fw3_flag_names[table]))
- continue;
-
if (!(handle = fw3_ipt_open(family, table)))
continue;
for (table = FW3_TABLE_FILTER; table <= FW3_TABLE_RAW; table++)
{
- if (!fw3_has_table(family == FW3_FAMILY_V6, fw3_flag_names[table]))
- continue;
-
if (!(handle = fw3_ipt_open(family, table)))
continue;
for (table = FW3_TABLE_FILTER; table <= FW3_TABLE_RAW; table++)
{
- if (!fw3_has_table(family == FW3_FAMILY_V6, fw3_flag_names[table]))
- continue;
-
if (!(handle = fw3_ipt_open(family, table)))
continue;
for (table = FW3_TABLE_FILTER; table <= FW3_TABLE_RAW; table++)
{
- if (!fw3_has_table(family == FW3_FAMILY_V6, fw3_flag_names[table]))
- continue;
-
if (!(handle = fw3_ipt_open(family, table)))
continue;
for (table = FW3_TABLE_FILTER; table <= FW3_TABLE_RAW; table++)
{
- if (!fw3_has_table(family == FW3_FAMILY_V6, fw3_flag_names[table]))
- continue;
-
if (!(handle = fw3_ipt_open(family, table)))
continue;
return seen;
}
-bool
-fw3_has_table(const bool ipv6, const char *table)
-{
- const char *path = ipv6
- ? "/proc/net/ip6_tables_names" : "/proc/net/ip_tables_names";
-
- return file_contains(path, table);
-}
-
bool
fw3_has_target(const bool ipv6, const char *target)
{
void fw3_pr(const char *fmt, ...)
__attribute__ ((format (printf, 1, 2)));
-bool fw3_has_table(const bool ipv6, const char *table);
-
bool fw3_has_target(const bool ipv6, const char *target);
bool fw3_lock(void);