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
bc674b52
Commit
bc674b52
authored
9 years ago
by
Michael Tüxen
Browse files
Options
Downloads
Patches
Plain Diff
Improve the sctp_paddrparams support on Linux.
parent
5012c87c
No related branches found
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_system_call.c
+22
-3
22 additions, 3 deletions
gtests/net/packetdrill/run_system_call.c
with
22 additions
and
3 deletions
gtests/net/packetdrill/run_system_call.c
+
22
−
3
View file @
bc674b52
...
...
@@ -2225,6 +2225,10 @@ static int syscall_setsockopt(struct state *state, struct syscall_spec *syscall,
struct
sctp_stream_value
stream_value
;
#endif
struct
sctp_paddrparams
paddrparams
;
#ifdef linux
u32
spp_ipv6_flowlabel
;
u8
spp_dscp
;
#endif
if
(
check_arg_count
(
args
,
5
,
error
))
return
STATUS_ERR
;
...
...
@@ -2355,17 +2359,32 @@ static int syscall_setsockopt(struct state *state, struct syscall_spec *syscall,
&
paddrparams
.
spp_flags
,
error
))
{
return
STATUS_ERR
;
}
#ifdef
SPP_IPV6_FLOWLABEL
#ifdef
__FreeBSD__
if
(
get_u32
(
val_expression
->
value
.
sctp_paddrparams
->
spp_ipv6_flowlabel
,
&
paddrparams
.
spp_ipv6_flowlabel
,
error
))
{
return
STATUS_ERR
;
}
#endif
#ifdef SPP_DSCP
if
(
get_u8
(
val_expression
->
value
.
sctp_paddrparams
->
spp_dscp
,
&
paddrparams
.
spp_dscp
,
error
))
{
return
STATUS_ERR
;
}
#endif
#ifdef linux
if
(
get_u32
(
val_expression
->
value
.
sctp_paddrparams
->
spp_ipv6_flowlabel
,
&
spp_ipv6_flowlabel
,
error
))
{
return
STATUS_ERR
;
}
else
if
(
spp_ipv6_flowlabel
!=
0
)
{
asprintf
(
error
,
"Bad setsockopt, Linux doesn't support paddrparams.spp_ipv6_flowlabel"
);
return
STATUS_ERR
;
}
if
(
get_u8
(
val_expression
->
value
.
sctp_paddrparams
->
spp_dscp
,
&
spp_dscp
,
error
))
{
return
STATUS_ERR
;
}
else
if
(
spp_dscp
!=
0
)
{
asprintf
(
error
,
"Bad setsockopt, Linux doesn't support paddrparams.spp_dscp"
);
return
STATUS_ERR
;
}
paddrparams
.
spp_sackdelay
=
0
;
#endif
optval
=
&
paddrparams
;
break
;
...
...
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