Commit 50a6e872 authored by Brian May's avatar Brian May

Don't use Xtoken if not set

parent ed0a92e7
......@@ -24,7 +24,7 @@ def pfctl(args, stdin=None):
return o
_pf_context = {'started_by_sshuttle': False, 'Xtoken': ''}
_pf_context = {'started_by_sshuttle': False, 'Xtoken': None}
# This are some classes and functions used to support pf in yosemite.
......@@ -227,6 +227,7 @@ class Method(BaseMethod):
else:
pfctl('-a sshuttle -F all')
if sys.platform == "darwin":
if _pf_context['Xtoken'] is not None:
pfctl('-X %s' % _pf_context['Xtoken'])
elif _pf_context['started_by_sshuttle']:
pfctl('-d')
......
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