1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-08 00:34:57 +03:00

2 Commits

Author SHA1 Message Date
9c17823809 Merge 0643ae70f5 into 895c16e3e8 2023-10-23 18:10:30 +03:00
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
5 changed files with 12 additions and 13 deletions

View File

@ -29,12 +29,12 @@ steps:
inputs: inputs:
sourceFolder: '$(Build.BinariesDirectory)' sourceFolder: '$(Build.BinariesDirectory)'
contents: '?(*.exe|*.se2|*.pdb)' contents: '?(*.exe|*.se2|*.pdb)'
TargetFolder: '$(Build.StagingDirectory)/binaries/${{parameters.architecture}}' TargetFolder: '$(Build.StagingDirectory)/binaries'
flattenFolders: true flattenFolders: true
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
inputs: inputs:
pathtoPublish: '$(Build.StagingDirectory)/binaries/${{parameters.architecture}}' pathtoPublish: '$(Build.StagingDirectory)/binaries'
artifactName: 'Binaries_${{parameters.architecture}}' artifactName: 'Binaries'
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
inputs: inputs:
pathtoPublish: '$(Build.StagingDirectory)/installers' pathtoPublish: '$(Build.StagingDirectory)/installers'

View File

@ -2,10 +2,8 @@ FreeBSD_task:
matrix: matrix:
env: env:
SSL: openssl SSL: openssl
OPENSSL_ROOT_DIR: /usr/local
env: env:
SSL: openssl32 SSL: openssl31
OPENSSL_ROOT_DIR: /usr/local
env: env:
# base openssl # base openssl
SSL: SSL:

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)

View File

@ -6269,6 +6269,8 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect)
localIP = BIND_LOCALIP_NULL; // Specify not to bind localIP = BIND_LOCALIP_NULL; // Specify not to bind
} }
else { else {
Debug("ClientConnectGetSocket(): Using client option %r and %d for binding\n"
, sess->ClientOption->BindLocalIP, sess->ClientOption->BindLocalPort);
// Nonzero address is for source IP address to bind. Zero address is for dummy not to bind. // Nonzero address is for source IP address to bind. Zero address is for dummy not to bind.
if (IsZeroIP(&sess->ClientOption->BindLocalIP) == true) { if (IsZeroIP(&sess->ClientOption->BindLocalIP) == true) {
localIP = BIND_LOCALIP_NULL; localIP = BIND_LOCALIP_NULL;
@ -6276,8 +6278,6 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect)
else { else {
localIP = &sess->ClientOption->BindLocalIP; localIP = &sess->ClientOption->BindLocalIP;
} }
Debug("ClientConnectGetSocket(): Source IP address %r and source port number %d for binding\n"
, &sess->ClientOption->BindLocalIP, sess->ClientOption->BindLocalPort);
} }
} }
// In the case of second and subsequent TCP/IP connections // In the case of second and subsequent TCP/IP connections
@ -6291,7 +6291,7 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect)
} }
else { else {
localport = sess->ClientOption->BindLocalPort + Count(sess->Connection->CurrentNumConnection) - 1; localport = sess->ClientOption->BindLocalPort + Count(sess->Connection->CurrentNumConnection) - 1;
Debug("ClientConnectGetSocket(): Additional source port number %u\n", localport); Debug("ClientConnectGetSocket(): Additional port number %u\n", localport);
} }
// Bottom of Bind outgoing connection // Bottom of Bind outgoing connection

View File

@ -5803,10 +5803,6 @@ SSL_PIPE *NewSslPipeEx3(bool server_mode, X *x, K *k, LIST *chain, DH_CTX *dh, b
#endif #endif
ssl = SSL_new(ssl_ctx); ssl = SSL_new(ssl_ctx);
if (ssl == NULL)
{
return NULL;
}
SSL_set_ex_data(ssl, GetSslClientCertIndex(), clientcert); SSL_set_ex_data(ssl, GetSslClientCertIndex(), clientcert);
} }