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
8fa3f492
Commit
8fa3f492
authored
9 years ago
by
Charlie Root
Browse files
Options
Downloads
Patches
Plain Diff
add support for sctp_auth_chunk socketoption
parent
5f11dfda
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
gtests/net/packetdrill/run_system_call.c
+14
-2
14 additions, 2 deletions
gtests/net/packetdrill/run_system_call.c
gtests/net/packetdrill/tests/bsd/sctp/api_tests/getsockopt/sctp_auth_chunk.pkt
+2
-0
2 additions, 0 deletions
...l/tests/bsd/sctp/api_tests/getsockopt/sctp_auth_chunk.pkt
with
16 additions
and
2 deletions
gtests/net/packetdrill/run_system_call.c
+
14
−
2
View file @
8fa3f492
...
...
@@ -764,7 +764,7 @@ static int check_u16array_expr(struct expression *expr_list, u16 *data, int data
switch
(
expr_list
->
type
)
{
case
EXPR_LIST
:
if
(
data_len
!=
expression_list_length
(
expr_list
->
value
.
list
))
{
asprintf
(
error
,
"%s length: expected: %u actual %
zu
"
,
asprintf
(
error
,
"%s length: expected: %u actual %
d
"
,
val_name
,
expression_list_length
(
expr_list
->
value
.
list
),
data_len
);
return
STATUS_ERR
;
}
...
...
@@ -3516,6 +3516,9 @@ static int syscall_setsockopt(struct state *state, struct syscall_spec *syscall,
#ifdef SCTP_SET_PEER_PRIMARY_ADDR
struct
sctp_setpeerprim
setpeerprim
;
#endif
#ifdef SCTP_AUTH_CHUNK
struct
sctp_authchunk
authchunk
;
#endif
#ifdef SCTP_PEER_ADDR_PARAMS
struct
sctp_paddrparams
paddrparams
;
#ifdef linux
...
...
@@ -3879,6 +3882,15 @@ static int syscall_setsockopt(struct state *state, struct syscall_spec *syscall,
optval
=
&
setpeerprim
;
break
;
#endif
#ifdef SCTP_AUTH_CHUNK
case
EXPR_SCTP_AUTHCHUNK
:
if
(
get_u8
(
val_expression
->
value
.
sctp_authchunk
->
sauth_chunk
,
&
authchunk
.
sauth_chunk
,
error
))
{
return
STATUS_ERR
;
}
optval
=
&
authchunk
;
break
;
#endif
#ifdef SCTP_PEER_ADDR_PARAMS
case
EXPR_SCTP_PEER_ADDR_PARAMS
:
if
(
get_sctp_assoc_t
(
val_expression
->
value
.
sctp_paddrparams
->
spp_assoc_id
,
...
...
@@ -4608,7 +4620,7 @@ static int syscall_sctp_sendx(struct state *state, struct syscall_spec *syscall,
if
(
ellipsis_arg
(
args
,
1
,
error
))
return
STATUS_ERR
;
len_expr
=
get_arg
(
args
,
2
,
error
);
if
(
get_
u32
(
len_expr
,
&
len
,
error
))
{
if
(
get_
size_t
(
len_expr
,
&
len
,
error
))
{
return
STATUS_ERR
;
}
addrs_expr
=
get_arg
(
args
,
3
,
error
);
...
...
This diff is collapsed.
Click to expand it.
gtests/net/packetdrill/tests/bsd/sctp/api_tests/getsockopt/sctp_auth_chunk.pkt
+
2
−
0
View file @
8fa3f492
...
...
@@ -11,5 +11,7 @@
+0 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
+0 setsockopt(3, IPPROTO_SCTP, SCTP_AUTH_CHUNK, {sauth_chunk=0}, 1) = 0
+0 setsockopt(3, IPPROTO_SCTP, SCTP_AUTH_CHUNK, {sauth_chunk=1}, 1) = -1
+0 setsockopt(3, IPPROTO_SCTP, SCTP_AUTH_CHUNK, {sauth_chunk=4}, 1) = 0
+0 close(3) = 0
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