|
|
@ -335,8 +335,10 @@ class Iptables: |
|
|
|
# Return a list of active iptables tables |
|
|
|
# Return a list of active iptables tables |
|
|
|
def _get_list_of_active_tables(self): |
|
|
|
def _get_list_of_active_tables(self): |
|
|
|
if os.path.isfile(self.iptables_names_file): |
|
|
|
if os.path.isfile(self.iptables_names_file): |
|
|
|
table_names = open(self.iptables_names_file, 'r').read() |
|
|
|
table_names = "filter\n" + open(self.iptables_names_file, 'r').read() |
|
|
|
return table_names.splitlines() |
|
|
|
list_set = set(table_names.splitlines()) |
|
|
|
|
|
|
|
unique_list = (list(list_set)) |
|
|
|
|
|
|
|
return unique_list |
|
|
|
else: |
|
|
|
else: |
|
|
|
return [] |
|
|
|
return [] |
|
|
|
|
|
|
|
|
|
|
|