Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scapy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
external
scapy
Commits
52304e80
Commit
52304e80
authored
15 years ago
by
Arnaud Ebalard
Browse files
Options
Downloads
Patches
Plain Diff
in6_getscope(): Correct multicast case + ULA now considered global
parent
0190c6f5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scapy/utils6.py
+11
-3
11 additions, 3 deletions
scapy/utils6.py
with
11 additions
and
3 deletions
scapy/utils6.py
+
11
−
3
View file @
52304e80
...
@@ -682,19 +682,27 @@ def in6_isaddrllallservers(str):
...
@@ -682,19 +682,27 @@ def in6_isaddrllallservers(str):
return
(
inet_pton
(
socket
.
AF_INET6
,
"
ff02::2
"
)
==
return
(
inet_pton
(
socket
.
AF_INET6
,
"
ff02::2
"
)
==
inet_pton
(
socket
.
AF_INET6
,
str
))
inet_pton
(
socket
.
AF_INET6
,
str
))
def
in6_getscope
(
addr
):
def
in6_getscope
(
addr
):
"""
"""
Returns the scope of the address.
Returns the scope of the address.
"""
"""
if
in6_isgladdr
(
addr
):
if
in6_isgladdr
(
addr
)
or
in6_isuladdr
(
addr
)
:
scope
=
IPV6_ADDR_GLOBAL
scope
=
IPV6_ADDR_GLOBAL
elif
in6_islladdr
(
addr
):
elif
in6_islladdr
(
addr
):
scope
=
IPV6_ADDR_LINKLOCAL
scope
=
IPV6_ADDR_LINKLOCAL
elif
in6_issladdr
(
addr
):
elif
in6_issladdr
(
addr
):
scope
=
IPV6_ADDR_SITELOCAL
scope
=
IPV6_ADDR_SITELOCAL
elif
in6_ismaddr
(
addr
):
elif
in6_ismaddr
(
addr
):
scope
=
IPV6_ADDR_MULTICAST
if
in6_ismgladdr
(
addr
):
scope
=
IPV6_ADDR_GLOBAL
elif
in6_ismlladdr
(
addr
):
scope
=
IPV6_ADDR_LINKLOCAL
elif
in6_ismsladdr
(
addr
):
scope
=
IPV6_ADDR_SITELOCAL
elif
in6_ismnladdr
(
addr
):
scope
=
IPV6_ADDR_LOOPBACK
else
:
scope
=
-
1
elif
addr
==
'
::1
'
:
elif
addr
==
'
::1
'
:
scope
=
IPV6_ADDR_LOOPBACK
scope
=
IPV6_ADDR_LOOPBACK
else
:
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment