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
884af2d2
Commit
884af2d2
authored
8 years ago
by
Hoelscher
Browse files
Options
Downloads
Patches
Plain Diff
allow all sctp_parameter in reconfig_chunk
parent
97db08a1
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/parser.y
+10
-24
10 additions, 24 deletions
gtests/net/packetdrill/parser.y
gtests/net/packetdrill/run_system_call.c
+17
-0
17 additions, 0 deletions
gtests/net/packetdrill/run_system_call.c
with
27 additions
and
24 deletions
gtests/net/packetdrill/parser.y
+
10
−
24
View file @
884af2d2
...
...
@@ -674,7 +674,7 @@ static struct tcp_option *new_tcp_fast_open_option(const char *cookie_string,
%type <chunk_list_item> sctp_shutdown_complete_chunk_spec
%type <chunk_list_item> sctp_i_data_chunk_spec
%type <chunk_list_item> sctp_pad_chunk_spec sctp_reconfig_chunk_spec
%type <parameter_list> opt_parameter_list_spec sctp_parameter_list_spec
sctp_reconfig_parameter_list_spec
%type <parameter_list> opt_parameter_list_spec sctp_parameter_list_spec
%type <parameter_list_item> sctp_parameter_spec
%type <parameter_list_item> sctp_generic_parameter_spec
%type <parameter_list_item> sctp_heartbeat_information_parameter_spec
...
...
@@ -688,7 +688,7 @@ static struct tcp_option *new_tcp_fast_open_option(const char *cookie_string,
%type <parameter_list_item> sctp_ecn_capable_parameter_spec
%type <parameter_list_item> sctp_supported_extensions_parameter_spec
%type <parameter_list_item> sctp_adaptation_indication_parameter_spec
%type <parameter_list_item> sctp_pad_parameter_spec
sctp_reconfig_parameter_spec
%type <parameter_list_item> sctp_pad_parameter_spec
%type <parameter_list_item> outgoing_ssn_reset_request incoming_ssn_reset_request
%type <parameter_list_item> reconfig_response ssn_tsn_reset_request generic_reconfig_request
%type <parameter_list_item> add_outgoing_streams_request add_incoming_streams_request
...
...
@@ -1734,27 +1734,6 @@ opt_result
| RESULT '=' ELLIPSIS { $$ = -1; }
;
sctp_reconfig_parameter_list_spec
: sctp_reconfig_parameter_spec {
$$ = sctp_parameter_list_new();
sctp_parameter_list_append($$, $1);
}
| sctp_reconfig_parameter_list_spec ',' sctp_reconfig_parameter_spec {
$$ = $1;
sctp_parameter_list_append($1, $3);
}
;
sctp_reconfig_parameter_spec
: outgoing_ssn_reset_request { $$ = $1; }
| incoming_ssn_reset_request { $$ = $1; }
| ssn_tsn_reset_request { $$ = $1; }
| reconfig_response { $$ = $1; }
| add_outgoing_streams_request { $$ = $1; }
| add_incoming_streams_request { $$ = $1; }
| generic_reconfig_request { $$ = $1; }
;
opt_sender_next_tsn
: SENDER_NEXT_TSN '=' INTEGER {
if (!is_valid_u32($3)) {
...
...
@@ -1849,7 +1828,7 @@ generic_reconfig_request
;
sctp_reconfig_chunk_spec
: RECONFIG '[' opt_flags ',' sctp_
reconfig_
parameter_list_spec ']' {
: RECONFIG '[' opt_flags ',' sctp_parameter_list_spec ']' {
$$ = sctp_reconfig_chunk_new($3, $5);
}
| RECONFIG '[' opt_flags ']' {
...
...
@@ -1884,6 +1863,13 @@ sctp_parameter_spec
| sctp_supported_extensions_parameter_spec { $$ = $1; }
| sctp_adaptation_indication_parameter_spec { $$ = $1; }
| sctp_pad_parameter_spec { $$ = $1; }
| outgoing_ssn_reset_request { $$ = $1; }
| incoming_ssn_reset_request { $$ = $1; }
| ssn_tsn_reset_request { $$ = $1; }
| reconfig_response { $$ = $1; }
| add_outgoing_streams_request { $$ = $1; }
| add_incoming_streams_request { $$ = $1; }
| generic_reconfig_request { $$ = $1; }
;
opt_parameter_type
...
...
This diff is collapsed.
Click to expand it.
gtests/net/packetdrill/run_system_call.c
+
17
−
0
View file @
884af2d2
...
...
@@ -3319,6 +3319,18 @@ static int syscall_getsockopt(struct state *state, struct syscall_spec *syscall,
return
STATUS_ERR
;
}
break
;
#endif
#ifdef SCTP_ADD_STREAMS
case
EXPR_SCTP_ADD_STREAMS
:
live_optval
=
malloc
(
sizeof
(
struct
sctp_add_streams
));
live_optlen
=
(
socklen_t
)
sizeof
(
struct
sctp_add_streams
);
if
(
get_sctp_assoc_t
(
val_expression
->
value
.
sctp_add_streams
->
sas_assoc_id
,
&
((
struct
sctp_add_streams
*
)
live_optval
)
->
sas_assoc_id
,
error
))
{
free
(
live_optval
);
return
STATUS_ERR
;
}
break
;
#endif
case
EXPR_LIST
:
s32_bracketed_arg
(
args
,
3
,
&
script_optval
,
error
);
...
...
@@ -3455,6 +3467,11 @@ static int syscall_getsockopt(struct state *state, struct syscall_spec *syscall,
case
EXPR_SCTP_RESET_STREAMS
:
// SCTP_RESET_STREAMS should not be a successfull option
break
;
#endif
#ifdef SCTP_ADD_STREAMS
case
EXPR_SCTP_ADD_STREAMS
:
// SCTP_ADD_STREAMS should not be a successfull option
break
;
#endif
case
EXPR_LIST
:
if
(
*
(
int
*
)
live_optval
!=
script_optval
)
{
...
...
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