Commit 1a2eab74 by Bach Dániel

firewall: random fixes

parent 433b8374
...@@ -89,7 +89,7 @@ class IptChain(object): ...@@ -89,7 +89,7 @@ class IptChain(object):
self.rules.add(rule) self.rules.add(rule)
def sort(self): def sort(self):
return sorted(list(self.rules)) return sorted(list(self.rules), reverse=True)
def __len__(self): def __len__(self):
return len(self.rules) return len(self.rules)
......
...@@ -32,8 +32,8 @@ class Migration(SchemaMigration): ...@@ -32,8 +32,8 @@ class Migration(SchemaMigration):
if rule.nat: if rule.nat:
# swap # swap
tmp = rule.dport tmp = rule.dport
# rule.dport = rule.nat_external_port rule.dport = rule.nat_external_port
# rule.nat_external_port = tmp rule.nat_external_port = tmp
if rule.direction == '0': if rule.direction == '0':
rule.direction = 'out' rule.direction = 'out'
elif rule.direction == '1': elif rule.direction == '1':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment