Oops, previous change to ipfw settings prevented cleanup from working.

This commit is contained in:
Avery Pennarun 2010-05-08 03:35:57 -04:00
parent 33efa5ac62
commit 5a4a2ab7f9

View File

@ -58,7 +58,7 @@ def ipfw_rule_exists(n):
p = subprocess.Popen(argv, stdout = subprocess.PIPE)
for line in p.stdout:
if line.startswith('%05d ' % n):
if line[5:].find('ipttl 42') < 0:
if line.find('ipttl 42') < 0 and line.find('established') < 0:
raise Fatal('non-sshuttle ipfw rule #%d already exists!' % n)
return True
rv = p.wait()