Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sshuttle
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pub
sshuttle
Commits
8520ea27
Commit
8520ea27
authored
Jul 27, 2016
by
vieira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use == instead of is to compare with AF_INET
parent
6a394dea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
pf.py
sshuttle/methods/pf.py
+3
-3
No files found.
sshuttle/methods/pf.py
View file @
8520ea27
...
...
@@ -122,10 +122,10 @@ class Generic(object):
ioctl
(
pf_get_dev
(),
pf
.
DIOCCHANGERULE
,
pr
)
def
_inet_version
(
self
,
family
):
return
b
'inet'
if
family
is
socket
.
AF_INET
else
b
'inet6'
return
b
'inet'
if
family
==
socket
.
AF_INET
else
b
'inet6'
def
_lo_addr
(
self
,
family
):
return
b
'127.0.0.1'
if
family
is
socket
.
AF_INET
else
b
'::1'
return
b
'127.0.0.1'
if
family
==
socket
.
AF_INET
else
b
'::1'
def
add_rules
(
self
,
anchor
,
rules
):
assert
isinstance
(
rules
,
bytes
)
...
...
@@ -369,7 +369,7 @@ def pf_get_dev():
def
pf_get_anchor
(
family
,
port
):
return
'sshuttle
%
s-
%
d'
%
(
''
if
family
is
socket
.
AF_INET
else
'6'
,
port
)
return
'sshuttle
%
s-
%
d'
%
(
''
if
family
==
socket
.
AF_INET
else
'6'
,
port
)
class
Method
(
BaseMethod
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment