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
3ecf379e
Commit
3ecf379e
authored
9 years ago
by
Pierre Lalet
Browse files
Options
Downloads
Plain Diff
Merge pull request #29 from danieljakots/master
Fix IPv6 support on OpenBSD
parents
746cbd99
a7d199a9
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/arch/unix.py
+23
-7
23 additions, 7 deletions
scapy/arch/unix.py
with
23 additions
and
7 deletions
scapy/arch/unix.py
+
23
−
7
View file @
3ecf379e
...
...
@@ -155,14 +155,30 @@ def in6_getifaddr():
"""
# List all network interfaces
try
:
f
=
os
.
popen
(
"
%s -l
"
%
conf
.
prog
.
ifconfig
)
except
OSError
,
msg
:
log_interactive
.
warning
(
"
Failed to execute ifconfig.
"
)
return
[]
if
scapy
.
arch
.
OPENBSD
:
try
:
f
=
os
.
popen
(
"
%s
"
%
conf
.
prog
.
ifconfig
)
except
OSError
,
msg
:
log_interactive
.
warning
(
"
Failed to execute ifconfig.
"
)
return
[]
# Get the list of network interfaces
splitted_line
=
[]
for
l
in
f
:
if
"
flags
"
in
l
:
iface
=
l
.
split
()[
0
].
rstrip
(
'
:
'
)
splitted_line
.
append
(
iface
)
else
:
# FreeBSD, NetBSD or Darwin
try
:
f
=
os
.
popen
(
"
%s -l
"
%
conf
.
prog
.
ifconfig
)
except
OSError
,
msg
:
log_interactive
.
warning
(
"
Failed to execute ifconfig.
"
)
return
[]
# Get the list of network interfaces
splitted_line
=
f
.
readline
().
rstrip
().
split
()
# Get the list of network interfaces
splitted_line
=
f
.
readline
().
rstrip
().
split
()
ret
=
[]
for
i
in
splitted_line
:
ret
+=
_in6_getifaddr
(
i
)
...
...
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