|
@@ -136,8 +136,10 @@ int sctp_send_reset_streams(struct sctp_association *asoc,
|
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
|
|
chunk = sctp_make_strreset_req(asoc, str_nums, str_list, out, in);
|
|
chunk = sctp_make_strreset_req(asoc, str_nums, str_list, out, in);
|
|
|
- if (!chunk)
|
|
|
|
|
|
|
+ if (!chunk) {
|
|
|
|
|
+ retval = -ENOMEM;
|
|
|
goto out;
|
|
goto out;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if (out) {
|
|
if (out) {
|
|
|
if (str_nums)
|
|
if (str_nums)
|
|
@@ -149,7 +151,6 @@ int sctp_send_reset_streams(struct sctp_association *asoc,
|
|
|
stream->out[i].state = SCTP_STREAM_CLOSED;
|
|
stream->out[i].state = SCTP_STREAM_CLOSED;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- asoc->strreset_outstanding = out + in;
|
|
|
|
|
asoc->strreset_chunk = chunk;
|
|
asoc->strreset_chunk = chunk;
|
|
|
sctp_chunk_hold(asoc->strreset_chunk);
|
|
sctp_chunk_hold(asoc->strreset_chunk);
|
|
|
|
|
|
|
@@ -157,8 +158,22 @@ int sctp_send_reset_streams(struct sctp_association *asoc,
|
|
|
if (retval) {
|
|
if (retval) {
|
|
|
sctp_chunk_put(asoc->strreset_chunk);
|
|
sctp_chunk_put(asoc->strreset_chunk);
|
|
|
asoc->strreset_chunk = NULL;
|
|
asoc->strreset_chunk = NULL;
|
|
|
|
|
+ if (!out)
|
|
|
|
|
+ goto out;
|
|
|
|
|
+
|
|
|
|
|
+ if (str_nums)
|
|
|
|
|
+ for (i = 0; i < str_nums; i++)
|
|
|
|
|
+ stream->out[str_list[i]].state =
|
|
|
|
|
+ SCTP_STREAM_OPEN;
|
|
|
|
|
+ else
|
|
|
|
|
+ for (i = 0; i < stream->outcnt; i++)
|
|
|
|
|
+ stream->out[i].state = SCTP_STREAM_OPEN;
|
|
|
|
|
+
|
|
|
|
|
+ goto out;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ asoc->strreset_outstanding = out + in;
|
|
|
|
|
+
|
|
|
out:
|
|
out:
|
|
|
return retval;
|
|
return retval;
|
|
|
}
|
|
}
|