Fixed bug #38315 tcp_eff_send_mss_impl() always subtract the difference in IPv6 header size

This commit is contained in:
sg 2015-01-18 14:08:11 +01:00
parent 05aa0ad114
commit 28476e3b7b

View File

@ -1707,8 +1707,10 @@ tcp_eff_send_mss_impl(u16_t sendmss, ipX_addr_t *dest
if (mtu != 0) {
mss_s = mtu - IP_HLEN - TCP_HLEN;
#if LWIP_IPV6
/* for IPv6, subtract the difference in header size */
mss_s -= (IP6_HLEN - IP_HLEN);
if (isipv6) {
/* for IPv6, subtract the difference in header size */
mss_s -= (IP6_HLEN - IP_HLEN);
}
#endif /* LWIP_IPV6 */
/* RFC 1122, chap 4.2.2.6:
* Eff.snd.MSS = min(SendMSS+20, MMS_S) - TCPhdrsize - IPoptionsize