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
46eac338
Commit
46eac338
authored
7 years ago
by
Lucas Pascal
Browse files
Options
Downloads
Patches
Plain Diff
[fix] requested correction
parent
2e7a2582
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scapy/layers/sctp.py
+2
-2
2 additions, 2 deletions
scapy/layers/sctp.py
test/regression.uts
+5
-0
5 additions, 0 deletions
test/regression.uts
with
7 additions
and
2 deletions
scapy/layers/sctp.py
+
2
−
2
View file @
46eac338
...
@@ -8,9 +8,9 @@
...
@@ -8,9 +8,9 @@
SCTP (Stream Control Transmission Protocol).
SCTP (Stream Control Transmission Protocol).
"""
"""
import
os
import
struct
import
struct
from
scapy.volatile
import
RandBin
from
scapy.config
import
conf
from
scapy.config
import
conf
from
scapy.packet
import
*
from
scapy.packet
import
*
from
scapy.fields
import
*
from
scapy.fields
import
*
...
@@ -319,7 +319,7 @@ class SCTPChunkParamRandom(_SCTPChunkParam, Packet):
...
@@ -319,7 +319,7 @@ class SCTPChunkParamRandom(_SCTPChunkParam, Packet):
fields_desc
=
[
ShortEnumField
(
"
type
"
,
0x8002
,
sctpchunkparamtypes
),
fields_desc
=
[
ShortEnumField
(
"
type
"
,
0x8002
,
sctpchunkparamtypes
),
FieldLenField
(
"
len
"
,
None
,
length_of
=
"
random
"
,
FieldLenField
(
"
len
"
,
None
,
length_of
=
"
random
"
,
adjust
=
lambda
pkt
,
x
:
x
+
4
),
adjust
=
lambda
pkt
,
x
:
x
+
4
),
PadField
(
StrLenField
(
"
random
"
,
os
.
urandom
(
32
),
PadField
(
StrLenField
(
"
random
"
,
RandBin
(
32
),
length_from
=
lambda
pkt
:
pkt
.
len
-
4
),
length_from
=
lambda
pkt
:
pkt
.
len
-
4
),
4
,
padwith
=
b
"
\x00
"
),]
4
,
padwith
=
b
"
\x00
"
),]
...
...
This diff is collapsed.
Click to expand it.
test/regression.uts
+
5
−
0
View file @
46eac338
...
@@ -7892,6 +7892,11 @@ assert(p.len == 8)
...
@@ -7892,6 +7892,11 @@ assert(p.len == 8)
assert(p.seq == 0)
assert(p.seq == 0)
assert(p.params == [])
assert(p.params == [])
= SCTPChunkParamRandom - Consecutive calls
~ sctp
param1, param2 = SCTPChunkParamRandom(), SCTPChunkParamRandom()
assert(param1.random != param2.random)
############
############
############
############
+ DHCP
+ DHCP
...
...
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