Skip to content
Snippets Groups Projects
Commit 884af2d2 authored by Hoelscher's avatar Hoelscher
Browse files

allow all sctp_parameter in reconfig_chunk

parent 97db08a1
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment