mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
sctp: use right in and out stream cnt
Since sctp reconf was added in sctp, the real cnt of in/out stream have not been c.sinit_max_instreams and c.sinit_num_ostreams any more. This patch is to replace them with stream->in/outcnt. Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
612307c6be
commit
afe89962ee
4 changed files with 11 additions and 12 deletions
|
@ -1920,7 +1920,7 @@ static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len)
|
|||
}
|
||||
|
||||
/* Check for invalid stream. */
|
||||
if (sinfo->sinfo_stream >= asoc->c.sinit_num_ostreams) {
|
||||
if (sinfo->sinfo_stream >= asoc->stream->outcnt) {
|
||||
err = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
|
@ -4461,8 +4461,8 @@ int sctp_get_sctp_info(struct sock *sk, struct sctp_association *asoc,
|
|||
info->sctpi_rwnd = asoc->a_rwnd;
|
||||
info->sctpi_unackdata = asoc->unack_data;
|
||||
info->sctpi_penddata = sctp_tsnmap_pending(&asoc->peer.tsn_map);
|
||||
info->sctpi_instrms = asoc->c.sinit_max_instreams;
|
||||
info->sctpi_outstrms = asoc->c.sinit_num_ostreams;
|
||||
info->sctpi_instrms = asoc->stream->incnt;
|
||||
info->sctpi_outstrms = asoc->stream->outcnt;
|
||||
list_for_each(pos, &asoc->base.inqueue.in_chunk_list)
|
||||
info->sctpi_inqueue++;
|
||||
list_for_each(pos, &asoc->outqueue.out_chunk_list)
|
||||
|
@ -4691,8 +4691,8 @@ static int sctp_getsockopt_sctp_status(struct sock *sk, int len,
|
|||
status.sstat_unackdata = asoc->unack_data;
|
||||
|
||||
status.sstat_penddata = sctp_tsnmap_pending(&asoc->peer.tsn_map);
|
||||
status.sstat_instrms = asoc->c.sinit_max_instreams;
|
||||
status.sstat_outstrms = asoc->c.sinit_num_ostreams;
|
||||
status.sstat_instrms = asoc->stream->incnt;
|
||||
status.sstat_outstrms = asoc->stream->outcnt;
|
||||
status.sstat_fragmentation_point = asoc->frag_point;
|
||||
status.sstat_primary.spinfo_assoc_id = sctp_assoc2id(transport->asoc);
|
||||
memcpy(&status.sstat_primary.spinfo_address, &transport->ipaddr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue