summaryrefslogtreecommitdiffstats
path: root/net/sctp/output.c
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2017-03-26 18:21:15 +0200
committerDavid S. Miller <davem@davemloft.net>2017-03-29 02:56:15 +0200
commitf9ba3501d50317697811ff3c48f623f08d616fc8 (patch)
treed2f56d5f76f94719818538d4a9194b69b5a50fba /net/sctp/output.c
parentnet: ipconfig: fix ic_close_devs() use-after-free (diff)
downloadlinux-f9ba3501d50317697811ff3c48f623f08d616fc8.tar.xz
linux-f9ba3501d50317697811ff3c48f623f08d616fc8.zip
sctp: change to save MSG_MORE flag into assoc
David Laight noticed the support for MSG_MORE with datamsg->force_delay didn't really work as we expected, as the first msg with MSG_MORE set would always block the following chunks' dequeuing. This Patch is to rewrite it by saving the MSG_MORE flag into assoc as David Laight suggested. asoc->force_delay is used to save MSG_MORE flag before a msg is sent. All chunks in queue would not be sent out if asoc->force_delay is set by the msg with MSG_MORE flag, until a new msg without MSG_MORE flag clears asoc->force_delay. Note that this change would not affect the flush is generated by other triggers, like asoc->state != ESTABLISHED, queue size > pmtu etc. v1->v2: Not clear asoc->force_delay after sending the msg with MSG_MORE flag. Fixes: 4ea0c32f5f42 ("sctp: add support for MSG_MORE") Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: David Laight <david.laight@aculab.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/output.c')
-rw-r--r--net/sctp/output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c
index 1224421036b3..73fd178007a3 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -704,7 +704,7 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet,
*/
if ((sctp_sk(asoc->base.sk)->nodelay || inflight == 0) &&
- !chunk->msg->force_delay)
+ !asoc->force_delay)
/* Nothing unacked */
return SCTP_XMIT_OK;