summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/backend.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-05-22 11:13:34 -0300
committerTomás Touceda <chiiph@leap.se>2014-05-22 11:13:34 -0300
commitbafcfbbfb571f537c0c621f6ea0eba7e183522a2 (patch)
treef11b4393fb87664b3fed308ca5b304fde28d9299 /src/leap/bitmask/backend.py
parente7cff9866e50f9730f8fc6ab70cf116ed38f7935 (diff)
parentf4ed7d8ab4401f6ef310118b037bc982ae73b75c (diff)
Merge remote-tracking branch 'refs/remotes/kali/bug/fw-on-restart' into develop
Diffstat (limited to 'src/leap/bitmask/backend.py')
-rw-r--r--src/leap/bitmask/backend.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/leap/bitmask/backend.py b/src/leap/bitmask/backend.py
index 0ab7040b..d6d5004f 100644
--- a/src/leap/bitmask/backend.py
+++ b/src/leap/bitmask/backend.py
@@ -390,19 +390,19 @@ class EIP(object):
# TODO: are we connected here?
signaler.signal(signaler.EIP_CONNECTED)
- def _do_stop(self, shutdown=False):
+ def _do_stop(self, shutdown=False, restart=False):
"""
Stop the service. This is run in a thread to avoid blocking.
"""
- self._vpn.terminate(shutdown)
+ self._vpn.terminate(shutdown, restart)
if IS_LINUX:
self._wait_for_firewall_down()
- def stop(self, shutdown=False):
+ def stop(self, shutdown=False, restart=False):
"""
Stop the service.
"""
- return threads.deferToThread(self._do_stop, shutdown)
+ return threads.deferToThread(self._do_stop, shutdown, restart)
def _wait_for_firewall_down(self):
"""
@@ -1460,14 +1460,17 @@ class Backend(object):
"""
self._call_queue.put(("eip", "start", None))
- def eip_stop(self, shutdown=False):
+ def eip_stop(self, shutdown=False, restart=False):
"""
Stop the EIP service.
- :param shutdown:
+ :param shutdown: whether this is the final shutdown.
:type shutdown: bool
+
+ :param restart: whether this is part of a restart.
+ :type restart: bool
"""
- self._call_queue.put(("eip", "stop", None, shutdown))
+ self._call_queue.put(("eip", "stop", None, shutdown, restart))
def eip_terminate(self):
"""