Commit 88a0dc7a authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

format: remove unneeded call to iptables

This was introduced in 081e745e and I don't see how it could have been
useful.
parent 1a821277
...@@ -961,12 +961,6 @@ class Tun(Tap): ...@@ -961,12 +961,6 @@ class Tun(Tap):
"Address is missing.".format(self.name)) "Address is missing.".format(self.name))
# create routes # create routes
super(Tun, self).createRoutes() super(Tun, self).createRoutes()
# add iptables rule to accept connections from this interface
chain_rule = ['INPUT', '-i', self.name, '-j', 'ACCEPT']
code, _ = callAndRead(['iptables', '-C'] + chain_rule, raise_on_error=False)
if code == 0:
# 0 means the rule does not exits so we are free to insert it
callAndRead(['iptables', '-I'] + chain_rule)
class Interface(object): class Interface(object):
......
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 to comment