summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-01-22 12:30:07 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-01-22 12:30:07 -0600
commit12b6991d1bfb1ed761707377f84ac08c32c38f2a (patch)
treef4a1e8ec57250b6467dfa1f57fdaa0a45abd6747
parent7108a54ecf9bd0f2a53d8f7ff6d9ca419adb9281 (diff)
downloadpx4-nuttx-12b6991d1bfb1ed761707377f84ac08c32c38f2a.tar.gz
px4-nuttx-12b6991d1bfb1ed761707377f84ac08c32c38f2a.tar.bz2
px4-nuttx-12b6991d1bfb1ed761707377f84ac08c32c38f2a.zip
Correct the MSS calculation
-rw-r--r--nuttx/include/nuttx/net/netconfig.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/include/nuttx/net/netconfig.h b/nuttx/include/nuttx/net/netconfig.h
index 560bf5d92..fed4f4ada 100644
--- a/nuttx/include/nuttx/net/netconfig.h
+++ b/nuttx/include/nuttx/net/netconfig.h
@@ -322,7 +322,7 @@
#define TCP_MAXSYNRTX 5
/* The TCP maximum segment size. This is should not be set to more
- * than NET_DEV_MTU(dev) - NET_LL_HDRLEN(dev) - IPv4TCP_HDRLEN.
+ * than NET_DEV_MTU(dev) - NET_LL_HDRLEN(dev) - IPvN_HDRLEN - TCP_HDRLEN.
*
* In the case where there are multiple network devices with different
* link layer protocols (CONFIG_NET_MULTILINK), each network device
@@ -330,7 +330,7 @@
* the minimum MSS for that case.
*/
-#define TCP_MSS(d,h) (NET_DEV_MTU(d) - NET_LL_HDRLEN(d) - (h))
+#define TCP_MSS(d,h) (NET_DEV_MTU(d) - NET_LL_HDRLEN(d) - TCP_HDRLEN - (h))
/* If Ethernet is supported, then it will have the smaller MSS */