Anchor name should be binary instead of str

This fixes an issue on FreeBSD with Python 3 where although no errors
were reported packets wouldn't get routed through sshuttle as the anchor
was not being properly set.
This commit is contained in:
vieira 2016-01-02 15:32:04 +00:00
parent c3cd3799e4
commit b55fd5cdcf

View File

@ -228,9 +228,9 @@ class Method(BaseMethod):
pf_status = pfctl('-s all')[0]
if b'\nrdr-anchor "sshuttle" all\n' not in pf_status:
pf_add_anchor_rule(PF_RDR, "sshuttle")
pf_add_anchor_rule(PF_RDR, b"sshuttle")
if b'\nanchor "sshuttle" all\n' not in pf_status:
pf_add_anchor_rule(PF_PASS, "sshuttle")
pf_add_anchor_rule(PF_PASS, b"sshuttle")
pfctl('-a sshuttle -f /dev/stdin', rules)
if sys.platform == "darwin":