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 authored and Moataz Elmasry committed 2018-01-11 23:53:38 +01:00
1 parent e391b4d503
commit ab4b27ab3c
10 files changed
+68 -32

No files matched your search

+7 -4
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);