Get rid of PMTU discovery; Cisco VPN has MTU=1200 and breaks ICMP too-big.

This commit is contained in:
Keith Winstein
2012-02-09 00:36:28 -05:00
parent ab297467a7
commit d8533ca3a6
+2 -2
View File
@@ -94,8 +94,8 @@ void Connection::setup( void )
throw NetworkException( "socket", errno ); throw NetworkException( "socket", errno );
} }
/* Enable path MTU discovery */ /* Disable path MTU discovery */
char flag = IP_PMTUDISC_DO; char flag = IP_PMTUDISC_DONT;
socklen_t optlen = sizeof( flag ); socklen_t optlen = sizeof( flag );
if ( setsockopt( sock, IPPROTO_IP, IP_MTU_DISCOVER, &flag, optlen ) < 0 ) { if ( setsockopt( sock, IPPROTO_IP, IP_MTU_DISCOVER, &flag, optlen ) < 0 ) {
throw NetworkException( "setsockopt", errno ); throw NetworkException( "setsockopt", errno );