aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/sctp
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-04-09 17:41:41 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-09 17:41:41 -0400
commitae95d7126104591348d37aaf78c8325967e02386 (patch)
tree3270712f030549d77d4c55246d056e02b9def29d /net/sctp
parentipv6: fix inet6_lookup_listener() (diff)
parentMerge tag 'tty-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty (diff)
downloadwireguard-linux-ae95d7126104591348d37aaf78c8325967e02386.tar.xz
wireguard-linux-ae95d7126104591348d37aaf78c8325967e02386.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c
index 97745351d58c..9844fe573029 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -705,7 +705,8 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet,
/* Check whether this chunk and all the rest of pending data will fit
* or delay in hopes of bundling a full sized packet.
*/
- if (chunk->skb->len + q->out_qlen >= transport->pathmtu - packet->overhead)
+ if (chunk->skb->len + q->out_qlen >
+ transport->pathmtu - packet->overhead - sizeof(sctp_data_chunk_t) - 4)
/* Enough data queued to fill a packet */
return SCTP_XMIT_OK;