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

Add parameter "ListenIP" to server configuration (vpn_server.config) (#202)

* Added parameter "ListenIP" to server configuration (vpn_server.config)

* Fixed bug in VPN client
This commit is contained in:
macvk
2018-01-12 01:53:38 +03:00
committed by Moataz Elmasry
parent e391b4d503
commit ab4b27ab3c
10 changed files with 68 additions and 32 deletions

View File

@ -159,11 +159,11 @@ void SiSetOpenVPNAndSSTPConfig(SERVER *s, OPENVPN_SSTP_CONFIG *c)
{
if (s->DisableOpenVPNServer)
{
OvsApplyUdpPortList(s->OpenVpnServerUdp, "");
OvsApplyUdpPortList(s->OpenVpnServerUdp, "", NULL);
}
else
{
OvsApplyUdpPortList(s->OpenVpnServerUdp, s->OpenVpnServerUdpPorts);
OvsApplyUdpPortList(s->OpenVpnServerUdp, s->OpenVpnServerUdpPorts, &s->ListenIP);
}
}
}
@ -5831,6 +5831,7 @@ void SiLoadServerCfg(SERVER *s, FOLDER *f)
}
s->DontBackupConfig = CfgGetBool(f, "DontBackupConfig");
CfgGetIp(f, "ListenIP", &s->ListenIP);
if (CfgIsItem(f, "BackupConfigOnlyWhenModified"))
{
@ -6287,6 +6288,7 @@ void SiWriteServerCfg(FOLDER *f, SERVER *s)
CfgAddBool(f, "DontBackupConfig", s->DontBackupConfig);
CfgAddBool(f, "BackupConfigOnlyWhenModified", s->BackupConfigOnlyWhenModified);
CfgAddIp(f, "ListenIP", &s->ListenIP);
if (s->Logger != NULL)
{
CfgAddInt(f, "ServerLogSwitchType", s->Logger->SwitchType);
@ -10965,8 +10967,6 @@ SERVER *SiNewServerEx(bool bridge, bool in_client_inner_server, bool relay_serve
s->Cedar->CheckExpires = true;
s->ServerListenerList = NewList(CompareServerListener);
s->StartTime = SystemTime64();
s->Syslog = NewSysLog(NULL, 0);
s->SyslogLock = NewLock();
s->TasksFromFarmControllerLock = NewLock();
if (bridge)
@ -10998,6 +10998,9 @@ SERVER *SiNewServerEx(bool bridge, bool in_client_inner_server, bool relay_serve
// Initialize the configuration
SiInitConfiguration(s);
s->Syslog = NewSysLog(NULL, 0, &s->Cedar->Server->ListenIP);
s->SyslogLock = NewLock();
SetFifoCurrentReallocMemSize(MEM_FIFO_REALLOC_MEM_SIZE);