summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-08-28 23:42:53 -0400
committerKali Kaneko <kali@leap.se>2017-08-30 16:18:56 -0400
commitec3c4a21b24afac389a10bdbbb9ac36acd2a6ffb (patch)
tree8e9ef63ae61244641421d858fe08f0410bfd6ada /src
parent081ef137ab4d1325a46a24752b11a60b953c1bb4 (diff)
[bug] assign initial empty state
Diffstat (limited to 'src')
-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 6a6b1fc2..4f0e97b8 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 d35857c7..8c61db21 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 831f04d2..ce4707af 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)