Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joanne Hugé
re6stnet
Commits
38d91ef2
Commit
38d91ef2
authored
Jul 11, 2014
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not advertise any IPv6 when UPnP is used
parent
2cf88eef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
re6st/upnpigd.py
re6st/upnpigd.py
+7
-4
No files found.
re6st/upnpigd.py
View file @
38d91ef2
...
@@ -29,13 +29,16 @@ class Forwarder(object):
...
@@ -29,13 +29,16 @@ class Forwarder(object):
return
wraps
(
wrapped
)(
wrapper
)
return
wraps
(
wrapped
)(
wrapper
)
def
checkExternalIp
(
self
,
ip
=
None
):
def
checkExternalIp
(
self
,
ip
=
None
):
if
not
ip
:
if
ip
:
try
:
socket
.
inet_aton
(
ip
)
except
socket
.
error
:
ip
=
None
else
:
ip
=
self
.
refresh
()
ip
=
self
.
refresh
()
if
not
ip
:
return
socket
.
AF_INET
,
()
# If port is None, we assume we're not NATed.
# If port is None, we assume we're not NATed.
return
socket
.
AF_INET
,
[(
ip
,
str
(
port
or
local
),
proto
)
return
socket
.
AF_INET
,
[(
ip
,
str
(
port
or
local
),
proto
)
for
local
,
proto
,
port
in
self
.
_rules
]
for
local
,
proto
,
port
in
self
.
_rules
]
if
ip
else
()
def
addRule
(
self
,
local_port
,
proto
):
def
addRule
(
self
,
local_port
,
proto
):
self
.
_rules
.
append
([
local_port
,
proto
,
None
])
self
.
_rules
.
append
([
local_port
,
proto
,
None
])
...
...
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