Commit 543e4faa authored by Julien Muchembled's avatar Julien Muchembled

iproute shipped by CentOS 6 is too old and does not provide 'tuntap' subcommand

parent 7ef3f232
......@@ -147,11 +147,13 @@ class TunnelManager(object):
def _tuntap(self, iface=None):
if iface:
self.new_iface_list.appendleft(iface)
action = 'del'
action = '--rmtun'
else:
iface = self.new_iface_list.popleft()
action = 'add'
args = 'ip', 'tuntap', action, 'dev', iface, 'mode', 'tap'
action = '--mktun'
# BBB: do not use 'ip tuntap' which is not available on old dists
args = ('openvpn', action, '--verb', '0',
'--dev', iface, '--dev-type', 'tap')
logging.debug('%r', args)
subprocess.check_call(args)
return iface
......
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