disable support for large MTUs in uTP until it is more reliable

This commit is contained in:
Arvid Norberg 2012-08-12 15:54:59 +00:00
parent 670437c375
commit a84c5e0e85
3 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,7 @@
* fix uTP edge case where udp socket buffer fills up
* fix nagle implementation in uTP
* disable support for large MTUs in uTP until it is more reliable
* expose post_torrent_updates and state_update_alert to python bindings
* fix incorrect SSL error messages
* fix windows build of shared library with openssl

View File

@ -1263,7 +1263,7 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
, utp_delayed_ack(0) // milliseconds
#endif
, utp_dynamic_sock_buf(true)
, utp_dynamic_sock_buf(false) // this doesn't seem quite reliable yet
, utp_loss_multiplier(50) // specified in percent
, mixed_mode_algorithm(peer_proportional)
, rate_limit_utp(true)

View File

@ -2340,8 +2340,14 @@ void utp_socket_impl::init_mtu(int link_mtu, int utp_mtu)
link_mtu -= decrease;
}
m_mtu = utp_mtu;
// set the ceiling to what we found out from the interface
m_mtu_ceiling = utp_mtu;
// however, start the search from a more conservative MTU
int overhead = link_mtu - utp_mtu;
m_mtu = TORRENT_ETHERNET_MTU - overhead;
if (m_mtu > m_mtu_ceiling) m_mtu = m_mtu_ceiling;
if (m_mtu_floor > utp_mtu) m_mtu_floor = utp_mtu;
// if the window size is smaller than one packet size