summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-10-13 13:45:58 -0300
committerRenato Botelho <renato@netgate.com>2015-10-13 13:45:58 -0300
commite52aa5f667faebee85874ec39c29fa1257dd554f (patch)
treeb08cff1a8d0fb8f667942aca5b9a8be9fb5dca03 /sys/netinet
parent945ed01c4bae06169f63978e43029c04d4abd731 (diff)
parent8096b85f202b18e1be6a5dd5251a10fcdb255a78 (diff)
downloadFreeBSD-src-e52aa5f667faebee85874ec39c29fa1257dd554f.zip
FreeBSD-src-e52aa5f667faebee85874ec39c29fa1257dd554f.tar.gz
Merge branch 'stable/10' into devel
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/tcp_output.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index ba0ec40..f1196e1 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -807,7 +807,8 @@ send:
*/
if (if_hw_tsomax != 0) {
/* compute maximum TSO length */
- max_len = (if_hw_tsomax - hdrlen);
+ max_len = (if_hw_tsomax - hdrlen -
+ max_linkhdr);
if (max_len <= 0) {
len = 0;
} else if (len > max_len) {
@@ -822,6 +823,15 @@ send:
*/
if (if_hw_tsomaxsegcount != 0 &&
if_hw_tsomaxsegsize != 0) {
+ /*
+ * Subtract one segment for the LINK
+ * and TCP/IP headers mbuf that will
+ * be prepended to this mbuf chain
+ * after the code in this section
+ * limits the number of mbufs in the
+ * chain to if_hw_tsomaxsegcount.
+ */
+ if_hw_tsomaxsegcount -= 1;
max_len = 0;
mb = sbsndmbuf(&so->so_snd, off, &moff);
OpenPOWER on IntegriCloud