From e39c4afce0cddb07bfa538f5ee972d6283bab96d Mon Sep 17 00:00:00 2001 From: vieira Date: Tue, 1 Nov 2016 21:01:56 +0000 Subject: [PATCH] Set started_by_sshuttle False after disabling pf We set it to true when we enable pf, but do not set it back to False after disabling. When using IPv4 and IPv6 we end up trying to disable twice which procudes an error while undoing changes in FreeBSD 11. --- sshuttle/methods/pf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sshuttle/methods/pf.py b/sshuttle/methods/pf.py index 410a67f..c77ea5d 100644 --- a/sshuttle/methods/pf.py +++ b/sshuttle/methods/pf.py @@ -64,6 +64,7 @@ class Generic(object): pfctl('-a %s -F all' % anchor) if _pf_context['started_by_sshuttle']: pfctl('-d') + _pf_context['started_by_sshuttle'] = False def query_nat(self, family, proto, src_ip, src_port, dst_ip, dst_port): [proto, family, src_port, dst_port] = [