Handle the absence of IP_MTU_DISCOVER

This commit is contained in:
Quentin Smith
2012-02-26 01:28:06 -05:00
committed by Keith Winstein
parent e8d14d35a6
commit a1671bcf3b
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -106,11 +106,13 @@ void Connection::setup( void )
}
/* Disable path MTU discovery */
#ifdef HAVE_IP_MTU_DISCOVER
char flag = IP_PMTUDISC_DONT;
socklen_t optlen = sizeof( flag );
if ( setsockopt( sock, IPPROTO_IP, IP_MTU_DISCOVER, &flag, optlen ) < 0 ) {
throw NetworkException( "setsockopt", errno );
}
#endif
}
Connection::Connection( const char *desired_ip ) /* server */