diff options
-rw-r--r-- | main.c | 15 | ||||
-rw-r--r-- | utils.c | 9 | ||||
-rw-r--r-- | utils.h | 2 |
3 files changed, 0 insertions, 26 deletions
@@ -195,9 +195,6 @@ stop(bool complete) 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; @@ -279,9 +276,6 @@ start(void) 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; @@ -350,9 +344,6 @@ reload(void) 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; @@ -379,9 +370,6 @@ start: 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; @@ -437,9 +425,6 @@ gc(void) 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; @@ -340,15 +340,6 @@ file_contains(const char *path, const char *str) } 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) { const char *path = ipv6 @@ -102,8 +102,6 @@ void fw3_command_close(void); 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); |