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
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
external
scapy
Commits
ca9cfdbb
Commit
ca9cfdbb
authored
Feb 5, 2015
by
Pierre Lalet
Browse files
Options
Downloads
Plain Diff
Merged in p-l/scapy/issue732 (pull request #94)
Apply Phil's patch to fix #732
parents
f4f22a2f
c341271c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
scapy/arch/linux.py
+3
-3
3 additions, 3 deletions
scapy/arch/linux.py
with
3 additions
and
3 deletions
scapy/arch/linux.py
+
3
−
3
View file @
ca9cfdbb
...
...
@@ -314,7 +314,6 @@ class L3PacketSocket(SuperSocket):
self
.
type
=
type
self
.
ins
=
socket
.
socket
(
socket
.
AF_PACKET
,
socket
.
SOCK_RAW
,
socket
.
htons
(
type
))
self
.
ins
.
setsockopt
(
socket
.
SOL_SOCKET
,
socket
.
SO_RCVBUF
,
0
)
_flush_fd
(
self
.
ins
)
if
iface
:
self
.
ins
.
bind
((
iface
,
type
))
if
not
nofilter
:
...
...
@@ -325,6 +324,7 @@ class L3PacketSocket(SuperSocket):
filter
=
"
not (%s)
"
%
conf
.
except_filter
if
filter
is
not
None
:
attach_filter
(
self
.
ins
,
filter
)
_flush_fd
(
self
.
ins
)
self
.
ins
.
setsockopt
(
socket
.
SOL_SOCKET
,
socket
.
SO_RCVBUF
,
2
**
30
)
self
.
outs
=
socket
.
socket
(
socket
.
AF_PACKET
,
socket
.
SOCK_RAW
,
socket
.
htons
(
type
))
self
.
outs
.
setsockopt
(
socket
.
SOL_SOCKET
,
socket
.
SO_SNDBUF
,
2
**
30
)
...
...
@@ -413,7 +413,6 @@ class L2Socket(SuperSocket):
iface
=
conf
.
iface
self
.
ins
=
socket
.
socket
(
socket
.
AF_PACKET
,
socket
.
SOCK_RAW
,
socket
.
htons
(
type
))
self
.
ins
.
setsockopt
(
socket
.
SOL_SOCKET
,
socket
.
SO_RCVBUF
,
0
)
_flush_fd
(
self
.
ins
)
if
not
nofilter
:
if
conf
.
except_filter
:
if
filter
:
...
...
@@ -423,6 +422,7 @@ class L2Socket(SuperSocket):
if
filter
is
not
None
:
attach_filter
(
self
.
ins
,
filter
)
self
.
ins
.
bind
((
iface
,
type
))
_flush_fd
(
self
.
ins
)
self
.
ins
.
setsockopt
(
socket
.
SOL_SOCKET
,
socket
.
SO_RCVBUF
,
2
**
30
)
self
.
outs
=
self
.
ins
self
.
outs
.
setsockopt
(
socket
.
SOL_SOCKET
,
socket
.
SO_SNDBUF
,
2
**
30
)
...
...
@@ -458,7 +458,6 @@ class L2ListenSocket(SuperSocket):
self
.
outs
=
None
self
.
ins
=
socket
.
socket
(
socket
.
AF_PACKET
,
socket
.
SOCK_RAW
,
socket
.
htons
(
type
))
self
.
ins
.
setsockopt
(
socket
.
SOL_SOCKET
,
socket
.
SO_RCVBUF
,
0
)
_flush_fd
(
self
.
ins
)
if
iface
is
not
None
:
self
.
ins
.
bind
((
iface
,
type
))
if
not
nofilter
:
...
...
@@ -482,6 +481,7 @@ class L2ListenSocket(SuperSocket):
if
self
.
promisc
:
for
i
in
self
.
iff
:
set_promisc
(
self
.
ins
,
i
)
_flush_fd
(
self
.
ins
)
self
.
ins
.
setsockopt
(
socket
.
SOL_SOCKET
,
socket
.
SO_RCVBUF
,
2
**
30
)
def
close
(
self
):
if
self
.
promisc
:
...
...
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