1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-27 03:49:52 +03:00

Compare commits

...

2 Commits

Author SHA1 Message Date
tickerguy
24b2fdfa7b
Merge 0643ae70f5 into 9c0b5f7001 2024-03-27 23:31:58 +09:00
tickerguy
0643ae70f5
Update BridgeUnix.c
On FreeBSD the stock code will attempt to expand the interface MTU any time a packet is to be sent that exceeds the current MTU.  This results in a down/up on the interface that is wildly disruptive to existing services on that adapter and, eventually, is likely to run into MTU limits and start logging failures, even with jumbo-frame capable adapters.  Thus if compiling on a FreeBSD machine disable this capability.  Tested against 12.3-STABLE and 13.1-STABLE on v4.38-9760 from the FreeBSD ports tree but likely applies here as well; see bug report https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267178
2022-10-19 12:39:32 -04:00

View File

@ -805,7 +805,12 @@ bool EthIsChangeMtuSupported(ETH *e)
return false; return false;
} }
// FreeBSD seriously dislikes MTU changes; disable if compiled on that platform
#ifndef __FreeBSD__
return true; return true;
#else
return false;
#endif
#else // defined(UNIX_LINUX) || defined(UNIX_BSD) || defined(UNIX_SOLARIS) #else // defined(UNIX_LINUX) || defined(UNIX_BSD) || defined(UNIX_SOLARIS)
return false; return false;
#endif // defined(UNIX_LINUX) || defined(UNIX_BSD) || defined(UNIX_SOLARIS) #endif // defined(UNIX_LINUX) || defined(UNIX_BSD) || defined(UNIX_SOLARIS)