Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Packetdrill_tarr_ext
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Stefan Gense
Packetdrill_tarr_ext
Commits
7644c6e1
Commit
7644c6e1
authored
9 years ago
by
Aomx
Browse files
Options
Downloads
Patches
Plain Diff
fix for issue 77
parent
8de8d828
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
gtests/net/packetdrill/run_packet.c
+10
-2
10 additions, 2 deletions
gtests/net/packetdrill/run_packet.c
with
10 additions
and
2 deletions
gtests/net/packetdrill/run_packet.c
+
10
−
2
View file @
7644c6e1
...
...
@@ -569,6 +569,10 @@ static int map_inbound_icmp_packet(
return
STATUS_ERR
;
}
static
inline
bool
is_valid_sack_length
(
struct
sctp_sack_chunk
*
sack
)
{
return
sack
->
length
==
16
+
2
*
sack
->
nr_gap_blocks
+
4
*
sack
->
nr_dup_tsns
;
}
static
int
map_inbound_sctp_packet
(
struct
socket
*
socket
,
struct
packet
*
live_packet
,
char
**
error
)
{
...
...
@@ -635,9 +639,13 @@ static int map_inbound_sctp_packet(
DEBUGP
(
"New SACK cum TSN %d
\n
"
,
ntohl
(
sack
->
cum_tsn
));
nr_gap_blocks
=
ntohs
(
sack
->
nr_gap_blocks
);
nr_dup_tsns
=
ntohs
(
sack
->
nr_dup_tsns
);
for
(
i
=
0
;
i
<
nr_dup_tsns
;
i
++
)
{
sack
->
block
[
i
+
nr_gap_blocks
].
tsn
=
htonl
(
ntohl
(
sack
->
block
[
i
+
nr_gap_blocks
].
tsn
)
+
local_diff
);
if
(
is_valid_sack_length
(
sack
))
{
for
(
i
=
0
;
i
<
nr_dup_tsns
;
i
++
)
{
sack
->
block
[
i
+
nr_gap_blocks
].
tsn
=
htonl
(
ntohl
(
sack
->
block
[
i
+
nr_gap_blocks
].
tsn
)
+
local_diff
);
}
}
break
;
case
SCTP_ABORT_CHUNK_TYPE
:
abort
=
(
struct
sctp_abort_chunk
*
)
chunk
;
...
...
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