Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Cedar/Hub.c2
-rw-r--r--src/Cedar/Hub.h1
-rw-r--r--src/Cedar/IPsec_IPC.c29
-rw-r--r--src/Cedar/Server.c4
-rw-r--r--src/Mayaqua/TcpIp.h7
-rw-r--r--src/bin/hamcore/DriverPackages/SeLow_Win8/x86/SeLow_x86.sysbin41856 -> 31072 bytes
-rw-r--r--src/bin/hamcore/DriverPackages/See/x64/See_x64.sysbin49024 -> 38240 bytes
-rw-r--r--src/bin/hamcore/DriverPackages/See/x86/See_x86.sysbin53888 -> 43104 bytes
-rw-r--r--src/bin/hamcore/SeLow_x64.sysbin0 -> 38368 bytes
-rw-r--r--src/bin/hamcore/inf/selow_x64/inf.catbin0 -> 6275 bytes
-rw-r--r--src/bin/hamcore/inf/selow_x86/inf.catbin0 -> 6275 bytes
-rw-r--r--src/bin/hamcore/inf/x64/inf.catbin0 -> 43113 bytes
-rw-r--r--src/bin/hamcore/inf/x86/inf.catbin0 -> 43113 bytes
-rw-r--r--src/bin/hamcore/pxwfp_x64.sysbin0 -> 22240 bytes
-rw-r--r--src/bin/hamcore/pxwfp_x86.sysbin0 -> 18016 bytes
-rw-r--r--src/bin/hamcore/strtable_en.stb1
-rw-r--r--src/bin/hamcore/vpn_driver.sysbin0 -> 25824 bytes
-rw-r--r--src/bin/hamcore/vpn_driver6.sysbin0 -> 26208 bytes
-rw-r--r--src/bin/hamcore/vpn_driver6_x64.sysbin0 -> 28640 bytes
-rw-r--r--src/bin/hamcore/vpn_driver_x64.sysbin0 -> 29536 bytes
-rw-r--r--src/bin/vpnweb.cabbin208947 -> 195823 bytes
-rw-r--r--src/bin/vpnweb.ocxbin342248 -> 333880 bytes
22 files changed, 44 insertions, 0 deletions
diff --git a/src/Cedar/Hub.c b/src/Cedar/Hub.c
index bced4460..8510f6d6 100644
--- a/src/Cedar/Hub.c
+++ b/src/Cedar/Hub.c
@@ -601,6 +601,7 @@ void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao)
GetHubAdminOptionDataAndSet(ao, "SecureNAT_RandomizeAssignIp", &o->SecureNAT_RandomizeAssignIp);
GetHubAdminOptionDataAndSet(ao, "DetectDormantSessionInterval", &o->DetectDormantSessionInterval);
GetHubAdminOptionDataAndSet(ao, "NoPhysicalIPOnPacketLog", &o->NoPhysicalIPOnPacketLog);
+ GetHubAdminOptionDataAndSet(ao, "UseHubNameAsDhcpUserClassOption", &o->UseHubNameAsDhcpUserClassOption);
}
// Convert the contents of the HUB_OPTION to data
@@ -670,6 +671,7 @@ void HubOptionStructToData(RPC_ADMIN_OPTION *ao, HUB_OPTION *o, char *hub_name)
Add(aol, NewAdminOption("SecureNAT_RandomizeAssignIp", o->SecureNAT_RandomizeAssignIp));
Add(aol, NewAdminOption("DetectDormantSessionInterval", o->DetectDormantSessionInterval));
Add(aol, NewAdminOption("NoPhysicalIPOnPacketLog", o->NoPhysicalIPOnPacketLog));
+ Add(aol, NewAdminOption("UseHubNameAsDhcpUserClassOption", o->UseHubNameAsDhcpUserClassOption));
Zero(ao, sizeof(RPC_ADMIN_OPTION));
diff --git a/src/Cedar/Hub.h b/src/Cedar/Hub.h
index b66416cd..02be3e01 100644
--- a/src/Cedar/Hub.h
+++ b/src/Cedar/Hub.h
@@ -279,6 +279,7 @@ struct HUB_OPTION
bool SecureNAT_RandomizeAssignIp; // Randomize the assignment IP address for new DHCP client
UINT DetectDormantSessionInterval; // Interval (seconds) threshold to detect a dormant VPN session
bool NoPhysicalIPOnPacketLog; // Disable saving physical IP address on the packet log
+ bool UseHubNameAsDhcpUserClassOption; // Add HubName to DHCP request as User-Class option
};
// MAC table entry
diff --git a/src/Cedar/IPsec_IPC.c b/src/Cedar/IPsec_IPC.c
index 934635c7..7108d70c 100644
--- a/src/Cedar/IPsec_IPC.c
+++ b/src/Cedar/IPsec_IPC.c
@@ -663,6 +663,24 @@ void FreeIPC(IPC *ipc)
Free(ipc);
}
+// Set User Class option if corresponding Virtual Hub optin is set
+void IPCDhcpSetConditionalUserClass(IPC *ipc, DHCP_OPTION_LIST *req)
+{
+ HUB *hub;
+
+ hub = GetHub(ipc->Cedar, ipc->HubName);
+ if (hub == NULL)
+ {
+ return;
+ }
+
+ if (hub->Option && hub->Option->UseHubNameAsDhcpUserClassOption == true)
+ {
+ StrCpy(req->UserClass, sizeof(req->UserClass), ipc->HubName);
+ }
+ ReleaseHub(hub);
+}
+
// Release the IP address from the DHCP server
void IPCDhcpFreeIP(IPC *ipc, IP *dhcp_server)
{
@@ -677,6 +695,7 @@ void IPCDhcpFreeIP(IPC *ipc, IP *dhcp_server)
Zero(&req, sizeof(req));
req.Opcode = DHCP_RELEASE;
req.ServerAddress = IPToUINT(dhcp_server);
+ IPCDhcpSetConditionalUserClass(ipc, &req);
FreeDHCPv4Data(IPCSendDhcpRequest(ipc, NULL, tran_id, &req, 0, 0, NULL));
}
@@ -697,6 +716,7 @@ void IPCDhcpRenewIP(IPC *ipc, IP *dhcp_server)
req.Opcode = DHCP_REQUEST;
StrCpy(req.Hostname, sizeof(req.Hostname), ipc->ClientHostname);
req.RequestedIp = IPToUINT(&ipc->ClientIPAddress);
+ IPCDhcpSetConditionalUserClass(ipc, &req);
FreeDHCPv4Data(IPCSendDhcpRequest(ipc, dhcp_server, tran_id, &req, 0, 0, NULL));
}
@@ -719,6 +739,7 @@ bool IPCDhcpRequestInformIP(IPC *ipc, DHCP_OPTION_LIST *opt, TUBE *discon_poll_t
req.Opcode = DHCP_INFORM;
req.ClientAddress = IPToUINT(client_ip);
StrCpy(req.Hostname, sizeof(req.Hostname), ipc->ClientHostname);
+ IPCDhcpSetConditionalUserClass(ipc, &req);
d = IPCSendDhcpRequest(ipc, NULL, tran_id, &req, DHCP_ACK, IPC_DHCP_TIMEOUT, discon_poll_tube);
if (d == NULL)
@@ -783,6 +804,7 @@ LABEL_RETRY_FOR_OPENVPN:
req.RequestedIp = request_ip;
req.Opcode = DHCP_DISCOVER;
StrCpy(req.Hostname, sizeof(req.Hostname), ipc->ClientHostname);
+ IPCDhcpSetConditionalUserClass(ipc, &req);
d = IPCSendDhcpRequest(ipc, NULL, tran_id, &req, DHCP_OFFER, IPC_DHCP_TIMEOUT, discon_poll_tube);
if (d == NULL)
@@ -893,6 +915,7 @@ LABEL_RETRY_FOR_OPENVPN:
StrCpy(req.Hostname, sizeof(req.Hostname), ipc->ClientHostname);
req.ServerAddress = d->ParsedOptionList->ServerAddress;
req.RequestedIp = d->ParsedOptionList->ClientAddress;
+ IPCDhcpSetConditionalUserClass(ipc, &req);
d2 = IPCSendDhcpRequest(ipc, NULL, tran_id, &req, DHCP_ACK, IPC_DHCP_TIMEOUT, discon_poll_tube);
if (d2 == NULL)
@@ -1227,6 +1250,12 @@ BUF *IPCBuildDhcpRequestOptions(IPC *ipc, DHCP_OPTION_LIST *opt)
Add(o, NewDhcpOption(DHCP_ID_HOST_NAME, opt->Hostname, StrLen(opt->Hostname)));
}
+ // User Class
+ if (IsEmptyStr(opt->UserClass) == false)
+ {
+ Add(o, NewDhcpOption(DHCP_ID_USER_CLASS, opt->UserClass, StrLen(opt->UserClass)));
+ }
+
// Vendor
Add(o, NewDhcpOption(DHCP_ID_VENDOR_ID, IPC_DHCP_VENDOR_ID, StrLen(IPC_DHCP_VENDOR_ID)));
diff --git a/src/Cedar/Server.c b/src/Cedar/Server.c
index c9322503..43a4d632 100644
--- a/src/Cedar/Server.c
+++ b/src/Cedar/Server.c
@@ -4106,6 +4106,7 @@ void SiLoadHubOptionCfg(FOLDER *f, HUB_OPTION *o)
o->SecureNAT_RandomizeAssignIp = CfgGetBool(f, "SecureNAT_RandomizeAssignIp");
o->DetectDormantSessionInterval = CfgGetInt(f, "DetectDormantSessionInterval");
o->NoPhysicalIPOnPacketLog = CfgGetBool(f, "NoPhysicalIPOnPacketLog");
+ o->UseHubNameAsDhcpUserClassOption = CfgGetBool(f, "UseHubNameAsDhcpUserClassOption");
// Enabled by default
if (CfgIsItem(f, "ManageOnlyPrivateIP"))
@@ -4204,6 +4205,7 @@ void SiWriteHubOptionCfg(FOLDER *f, HUB_OPTION *o)
CfgAddBool(f, "DisableUserModeSecureNAT", o->DisableUserModeSecureNAT);
CfgAddBool(f, "DisableCheckMacOnLocalBridge", o->DisableCheckMacOnLocalBridge);
CfgAddBool(f, "DisableCorrectIpOffloadChecksum", o->DisableCorrectIpOffloadChecksum);
+ CfgAddBool(f, "UseHubNameAsDhcpUserClassOption", o->UseHubNameAsDhcpUserClassOption);
}
// Write the user
@@ -7530,6 +7532,7 @@ void SiCalledUpdateHub(SERVER *s, PACK *p)
o.DisableUserModeSecureNAT = PackGetBool(p, "DisableUserModeSecureNAT");
o.DisableCheckMacOnLocalBridge = PackGetBool(p, "DisableCheckMacOnLocalBridge");
o.DisableCorrectIpOffloadChecksum = PackGetBool(p, "DisableCorrectIpOffloadChecksum");
+ o.UseHubNameAsDhcpUserClassOption = PackGetBool(p, "UseHubNameAsDhcpUserClassOption");
save_packet_log = PackGetInt(p, "SavePacketLog");
packet_log_switch_type = PackGetInt(p, "PacketLogSwitchType");
@@ -9380,6 +9383,7 @@ void SiPackAddCreateHub(PACK *p, HUB *h)
PackAddInt(p, "SecurityLogSwitchType", h->LogSetting.SecurityLogSwitchType);
PackAddData(p, "HashedPassword", h->HashedPassword, SHA1_SIZE);
PackAddData(p, "SecurePassword", h->SecurePassword, SHA1_SIZE);
+ PackAddBool(p, "UseHubNameAsDhcpUserClassOption", h->Option->UseHubNameAsDhcpUserClassOption);
SiAccessListToPack(p, h->AccessList);
diff --git a/src/Mayaqua/TcpIp.h b/src/Mayaqua/TcpIp.h
index 2353b37a..c358138e 100644
--- a/src/Mayaqua/TcpIp.h
+++ b/src/Mayaqua/TcpIp.h
@@ -623,6 +623,7 @@ struct ICMPV6_HEADER_INFO
#define DHCP_ID_CLIENT_ID 0x3d
#define DHCP_ID_VENDOR_ID 0x3c
#define DHCP_ID_REQ_PARAM_LIST 0x37
+#define DHCP_ID_USER_CLASS 0x4d
#define DHCP_ID_CLASSLESS_ROUTE 0x79
#define DHCP_ID_MS_CLASSLESS_ROUTE 0xF9
#define DHCP_ID_PRIVATE 0xFA
@@ -794,6 +795,8 @@ struct DHCP_CLASSLESS_ROUTE_TABLE
DHCP_CLASSLESS_ROUTE Entries[MAX_DHCP_CLASSLESS_ROUTE_ENTRIES]; // Entries
};
+#define MAX_USER_CLASS_LEN 255
+
// DHCP option list
struct DHCP_OPTION_LIST
{
@@ -803,6 +806,10 @@ struct DHCP_OPTION_LIST
// Client request
UINT RequestedIp; // Requested IP address
char Hostname[MAX_HOST_NAME_LEN + 1]; // Host name
+ char UserClass[MAX_USER_CLASS_LEN + 1]; // User class
+ // RFC3003 defines that User Class option is array of text strings,
+ // but the most popular DHCP clients and servers,
+ // i.e. ISC DHCP and Microsoft DHCP Server, consider it a text string
// Server response
UINT ClientAddress; // Client address
diff --git a/src/bin/hamcore/DriverPackages/SeLow_Win8/x86/SeLow_x86.sys b/src/bin/hamcore/DriverPackages/SeLow_Win8/x86/SeLow_x86.sys
index 3e82b334..fd53c8f6 100644
--- a/src/bin/hamcore/DriverPackages/SeLow_Win8/x86/SeLow_x86.sys
+++ b/src/bin/hamcore/DriverPackages/SeLow_Win8/x86/SeLow_x86.sys
Binary files differ
diff --git a/src/bin/hamcore/DriverPackages/See/x64/See_x64.sys b/src/bin/hamcore/DriverPackages/See/x64/See_x64.sys
index 5f365667..ab525324 100644
--- a/src/bin/hamcore/DriverPackages/See/x64/See_x64.sys
+++ b/src/bin/hamcore/DriverPackages/See/x64/See_x64.sys
Binary files differ
diff --git a/src/bin/hamcore/DriverPackages/See/x86/See_x86.sys b/src/bin/hamcore/DriverPackages/See/x86/See_x86.sys
index cf2fe7ec..58e131f4 100644
--- a/src/bin/hamcore/DriverPackages/See/x86/See_x86.sys
+++ b/src/bin/hamcore/DriverPackages/See/x86/See_x86.sys
Binary files differ
diff --git a/src/bin/hamcore/SeLow_x64.sys b/src/bin/hamcore/SeLow_x64.sys
new file mode 100644
index 00000000..c18c4c40
--- /dev/null
+++ b/src/bin/hamcore/SeLow_x64.sys
Binary files differ
diff --git a/src/bin/hamcore/inf/selow_x64/inf.cat b/src/bin/hamcore/inf/selow_x64/inf.cat
new file mode 100644
index 00000000..efa86a50
--- /dev/null
+++ b/src/bin/hamcore/inf/selow_x64/inf.cat
Binary files differ
diff --git a/src/bin/hamcore/inf/selow_x86/inf.cat b/src/bin/hamcore/inf/selow_x86/inf.cat
new file mode 100644
index 00000000..674b7f7f
--- /dev/null
+++ b/src/bin/hamcore/inf/selow_x86/inf.cat
Binary files differ
diff --git a/src/bin/hamcore/inf/x64/inf.cat b/src/bin/hamcore/inf/x64/inf.cat
new file mode 100644
index 00000000..ca890000
--- /dev/null
+++ b/src/bin/hamcore/inf/x64/inf.cat
Binary files differ
diff --git a/src/bin/hamcore/inf/x86/inf.cat b/src/bin/hamcore/inf/x86/inf.cat
new file mode 100644
index 00000000..2d1578fa
--- /dev/null
+++ b/src/bin/hamcore/inf/x86/inf.cat
Binary files differ
diff --git a/src/bin/hamcore/pxwfp_x64.sys b/src/bin/hamcore/pxwfp_x64.sys
new file mode 100644
index 00000000..1e218635
--- /dev/null
+++ b/src/bin/hamcore/pxwfp_x64.sys
Binary files differ
diff --git a/src/bin/hamcore/pxwfp_x86.sys b/src/bin/hamcore/pxwfp_x86.sys
new file mode 100644
index 00000000..e064a92b
--- /dev/null
+++ b/src/bin/hamcore/pxwfp_x86.sys
Binary files differ
diff --git a/src/bin/hamcore/strtable_en.stb b/src/bin/hamcore/strtable_en.stb
index 0ce48e60..630d15d9 100644
--- a/src/bin/hamcore/strtable_en.stb
+++ b/src/bin/hamcore/strtable_en.stb
@@ -556,6 +556,7 @@ HUB_AO_AssignVLanIdByRadiusAttribute Enable the VLAN ID dynamic assignment func
HUB_AO_SecureNAT_RandomizeAssignIp If you set this option to non-zero value, then the Virtual DHCP Server of the SecureNAT function will choose an unused IP address randomly from the DHCP pool while the default behavior is to choose the first unused IP address.
HUB_AO_DetectDormantSessionInterval If you set this option to non-zero value, then the Virtual Hub will treat the VPN sessions, which have transmitted no packets for the last specified intervals (in seconds), as Dormant Sessions. The Virtual Hub will not flood packets, which should be flood, to any Dormant Sessions.
HUB_AO_NoPhysicalIPOnPacketLog If you set this option to non-zero value, then the physical IP addresses of VPN clients of either the source VPN session or the destination VPN session will not be recorded on the packet log file.
+HUB_AO_UseHubNameAsDhcpUserClassOption If you set this option to non-zero value, then the Virtual Hub Name will be added to a DHCP request to an external DHCP server as the "User-Class" option. This allows to use separate pools of IP addresses for each Virtual Hub.
# Concerning failed connection dialogs
diff --git a/src/bin/hamcore/vpn_driver.sys b/src/bin/hamcore/vpn_driver.sys
new file mode 100644
index 00000000..77bdcdc6
--- /dev/null
+++ b/src/bin/hamcore/vpn_driver.sys
Binary files differ
diff --git a/src/bin/hamcore/vpn_driver6.sys b/src/bin/hamcore/vpn_driver6.sys
new file mode 100644
index 00000000..0e755377
--- /dev/null
+++ b/src/bin/hamcore/vpn_driver6.sys
Binary files differ
diff --git a/src/bin/hamcore/vpn_driver6_x64.sys b/src/bin/hamcore/vpn_driver6_x64.sys
new file mode 100644
index 00000000..dd1269d4
--- /dev/null
+++ b/src/bin/hamcore/vpn_driver6_x64.sys
Binary files differ
diff --git a/src/bin/hamcore/vpn_driver_x64.sys b/src/bin/hamcore/vpn_driver_x64.sys
new file mode 100644
index 00000000..b243aa08
--- /dev/null
+++ b/src/bin/hamcore/vpn_driver_x64.sys
Binary files differ
diff --git a/src/bin/vpnweb.cab b/src/bin/vpnweb.cab
index f259c6ee..3e0cc96e 100644
--- a/src/bin/vpnweb.cab
+++ b/src/bin/vpnweb.cab
Binary files differ
diff --git a/src/bin/vpnweb.ocx b/src/bin/vpnweb.ocx
index 9e95ba34..4cd1d7f1 100644
--- a/src/bin/vpnweb.ocx
+++ b/src/bin/vpnweb.ocx
Binary files differ