Use PMTUDISC_WANT

This commit is contained in:
Keith Winstein
2012-01-07 04:24:55 -05:00
parent 9c769d5d79
commit 322aa506a1
+7
View File
@@ -75,6 +75,13 @@ void Connection::setup( void )
if ( sock < 0 ) {
throw NetworkException( "socket", errno );
}
/* Enable path MTU discovery */
char flag = IP_PMTUDISC_WANT;
socklen_t optlen = sizeof( flag );
if ( setsockopt( sock, IPPROTO_IP, IP_MTU_DISCOVER, &flag, optlen ) < 0 ) {
throw NetworkException( "setsockopt", errno );
}
}
Connection::Connection() /* server */