summaryrefslogtreecommitdiff
path: root/src/leap/bitmask
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r--src/leap/bitmask/vpn/management.py1
-rw-r--r--src/leap/bitmask/vpn/process.py3
-rw-r--r--src/leap/bitmask/vpn/tunnel.py6
3 files changed, 6 insertions, 4 deletions
diff --git a/src/leap/bitmask/vpn/management.py b/src/leap/bitmask/vpn/management.py
index 6a6b1fc..4f0e97b 100644
--- a/src/leap/bitmask/vpn/management.py
+++ b/src/leap/bitmask/vpn/management.py
@@ -148,6 +148,7 @@ class ManagementProtocol(LineReceiver):
def _handle_STATE(self, data):
data = data.strip().split(',')
remote = rport = None
+ state = ''
try:
if len(data) == 9:
(ts, state, verbose, localtun,
diff --git a/src/leap/bitmask/vpn/process.py b/src/leap/bitmask/vpn/process.py
index d35857c..8c61db2 100644
--- a/src/leap/bitmask/vpn/process.py
+++ b/src/leap/bitmask/vpn/process.py
@@ -91,7 +91,8 @@ class _VPNProcess(protocol.ProcessProtocol):
if socket_port == 'unix':
folder = os.path.split(self._host)[0]
- assert os.path.isfile(folder)
+ if not os.path.isdir(folder):
+ os.makedirs(folder)
self._management_endpoint = clientFromString(
reactor, b"unix:path=%s" % socket_host)
else:
diff --git a/src/leap/bitmask/vpn/tunnel.py b/src/leap/bitmask/vpn/tunnel.py
index 831f04d..ce4707a 100644
--- a/src/leap/bitmask/vpn/tunnel.py
+++ b/src/leap/bitmask/vpn/tunnel.py
@@ -50,7 +50,7 @@ class ConfiguredTunnel(object):
On start, it spawns a VPNProcess instance that will use a vpnlauncher
suited for the running platform and connect to the management interface
opened by the openvpn process, executing commands over that interface on
- demand.
+ demand
"""
log = Logger()
@@ -100,8 +100,8 @@ class ConfiguredTunnel(object):
@defer.inlineCallbacks
def _start_vpn(self):
self.log.debug('VPN: start')
- args = [self._vpnconfig, self._providerconfig, self._host,
- self._port]
+ args = [self._vpnconfig, self._providerconfig,
+ self._host, self._port]
kwargs = {'openvpn_verb': 4, 'remotes': self._remotes,
'restartfun': self._restart_vpn}
vpnproc = VPNProcess(*args, **kwargs)