Get rid of PMTU discovery; Cisco VPN has MTU=1200 and breaks ICMP too-big.
This commit is contained in:
@@ -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 );
|
||||||
|
|||||||
Reference in New Issue
Block a user