diff options
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 0f378ea2ae38..c1401f43d40f 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -1907,7 +1907,7 @@ static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len) | |||
1907 | } | 1907 | } |
1908 | 1908 | ||
1909 | if (asoc->pmtu_pending) | 1909 | if (asoc->pmtu_pending) |
1910 | sctp_assoc_pending_pmtu(sk, asoc); | 1910 | sctp_assoc_pending_pmtu(asoc); |
1911 | 1911 | ||
1912 | /* If fragmentation is disabled and the message length exceeds the | 1912 | /* If fragmentation is disabled and the message length exceeds the |
1913 | * association fragmentation point, return EMSGSIZE. The I-D | 1913 | * association fragmentation point, return EMSGSIZE. The I-D |
@@ -1920,7 +1920,7 @@ static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len) | |||
1920 | } | 1920 | } |
1921 | 1921 | ||
1922 | /* Check for invalid stream. */ | 1922 | /* Check for invalid stream. */ |
1923 | if (sinfo->sinfo_stream >= asoc->c.sinit_num_ostreams) { | 1923 | if (sinfo->sinfo_stream >= asoc->stream->outcnt) { |
1924 | err = -EINVAL; | 1924 | err = -EINVAL; |
1925 | goto out_free; | 1925 | goto out_free; |
1926 | } | 1926 | } |
@@ -1965,7 +1965,7 @@ static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len) | |||
1965 | err = PTR_ERR(datamsg); | 1965 | err = PTR_ERR(datamsg); |
1966 | goto out_free; | 1966 | goto out_free; |
1967 | } | 1967 | } |
1968 | datamsg->force_delay = !!(msg->msg_flags & MSG_MORE); | 1968 | asoc->force_delay = !!(msg->msg_flags & MSG_MORE); |
1969 | 1969 | ||
1970 | /* Now send the (possibly) fragmented message. */ | 1970 | /* Now send the (possibly) fragmented message. */ |
1971 | list_for_each_entry(chunk, &datamsg->chunks, frag_list) { | 1971 | list_for_each_entry(chunk, &datamsg->chunks, frag_list) { |
@@ -2435,7 +2435,7 @@ static int sctp_apply_peer_addr_params(struct sctp_paddrparams *params, | |||
2435 | if ((params->spp_flags & SPP_PMTUD_DISABLE) && params->spp_pathmtu) { | 2435 | if ((params->spp_flags & SPP_PMTUD_DISABLE) && params->spp_pathmtu) { |
2436 | if (trans) { | 2436 | if (trans) { |
2437 | trans->pathmtu = params->spp_pathmtu; | 2437 | trans->pathmtu = params->spp_pathmtu; |
2438 | sctp_assoc_sync_pmtu(sctp_opt2sk(sp), asoc); | 2438 | sctp_assoc_sync_pmtu(asoc); |
2439 | } else if (asoc) { | 2439 | } else if (asoc) { |
2440 | asoc->pathmtu = params->spp_pathmtu; | 2440 | asoc->pathmtu = params->spp_pathmtu; |
2441 | } else { | 2441 | } else { |
@@ -2451,7 +2451,7 @@ static int sctp_apply_peer_addr_params(struct sctp_paddrparams *params, | |||
2451 | (trans->param_flags & ~SPP_PMTUD) | pmtud_change; | 2451 | (trans->param_flags & ~SPP_PMTUD) | pmtud_change; |
2452 | if (update) { | 2452 | if (update) { |
2453 | sctp_transport_pmtu(trans, sctp_opt2sk(sp)); | 2453 | sctp_transport_pmtu(trans, sctp_opt2sk(sp)); |
2454 | sctp_assoc_sync_pmtu(sctp_opt2sk(sp), asoc); | 2454 | sctp_assoc_sync_pmtu(asoc); |
2455 | } | 2455 | } |
2456 | } else if (asoc) { | 2456 | } else if (asoc) { |
2457 | asoc->param_flags = | 2457 | asoc->param_flags = |
@@ -4461,8 +4461,8 @@ int sctp_get_sctp_info(struct sock *sk, struct sctp_association *asoc, | |||
4461 | info->sctpi_rwnd = asoc->a_rwnd; | 4461 | info->sctpi_rwnd = asoc->a_rwnd; |
4462 | info->sctpi_unackdata = asoc->unack_data; | 4462 | info->sctpi_unackdata = asoc->unack_data; |
4463 | info->sctpi_penddata = sctp_tsnmap_pending(&asoc->peer.tsn_map); | 4463 | info->sctpi_penddata = sctp_tsnmap_pending(&asoc->peer.tsn_map); |
4464 | info->sctpi_instrms = asoc->c.sinit_max_instreams; | 4464 | info->sctpi_instrms = asoc->stream->incnt; |
4465 | info->sctpi_outstrms = asoc->c.sinit_num_ostreams; | 4465 | info->sctpi_outstrms = asoc->stream->outcnt; |
4466 | list_for_each(pos, &asoc->base.inqueue.in_chunk_list) | 4466 | list_for_each(pos, &asoc->base.inqueue.in_chunk_list) |
4467 | info->sctpi_inqueue++; | 4467 | info->sctpi_inqueue++; |
4468 | list_for_each(pos, &asoc->outqueue.out_chunk_list) | 4468 | list_for_each(pos, &asoc->outqueue.out_chunk_list) |
@@ -4691,8 +4691,8 @@ static int sctp_getsockopt_sctp_status(struct sock *sk, int len, | |||
4691 | status.sstat_unackdata = asoc->unack_data; | 4691 | status.sstat_unackdata = asoc->unack_data; |
4692 | 4692 | ||
4693 | status.sstat_penddata = sctp_tsnmap_pending(&asoc->peer.tsn_map); | 4693 | status.sstat_penddata = sctp_tsnmap_pending(&asoc->peer.tsn_map); |
4694 | status.sstat_instrms = asoc->c.sinit_max_instreams; | 4694 | status.sstat_instrms = asoc->stream->incnt; |
4695 | status.sstat_outstrms = asoc->c.sinit_num_ostreams; | 4695 | status.sstat_outstrms = asoc->stream->outcnt; |
4696 | status.sstat_fragmentation_point = asoc->frag_point; | 4696 | status.sstat_fragmentation_point = asoc->frag_point; |
4697 | status.sstat_primary.spinfo_assoc_id = sctp_assoc2id(transport->asoc); | 4697 | status.sstat_primary.spinfo_assoc_id = sctp_assoc2id(transport->asoc); |
4698 | memcpy(&status.sstat_primary.spinfo_address, &transport->ipaddr, | 4698 | memcpy(&status.sstat_primary.spinfo_address, &transport->ipaddr, |