mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-12 02:34:59 +03:00
- Fixed the problem occurs when RPC messages between Cluster Members exceed 64Kbytes.
- Fixed the RADIUS PEAP client to use the standard TLS versioning. - Implementation of a function to fix the MAC address of L3 VPN protocol by entering e.g. "MAC: 112233445566" in the "Notes" field of the user information. - Implementation of a function to fix the virtual MAC address to be assigned to the L3 VPN client as a string attribute from RADIUS server when authentication.
This commit is contained in:
@ -2047,9 +2047,9 @@ void if_free(SESSION *s);
|
||||
// Create a server session
|
||||
SESSION *NewServerSession(CEDAR *cedar, CONNECTION *c, HUB *h, char *username, POLICY *policy)
|
||||
{
|
||||
return NewServerSessionEx(cedar, c, h, username, policy, false);
|
||||
return NewServerSessionEx(cedar, c, h, username, policy, false, NULL);
|
||||
}
|
||||
SESSION *NewServerSessionEx(CEDAR *cedar, CONNECTION *c, HUB *h, char *username, POLICY *policy, bool inproc_mode)
|
||||
SESSION *NewServerSessionEx(CEDAR *cedar, CONNECTION *c, HUB *h, char *username, POLICY *policy, bool inproc_mode, UCHAR *ipc_mac_address)
|
||||
{
|
||||
SESSION *s;
|
||||
char name[MAX_SIZE];
|
||||
@ -2170,28 +2170,35 @@ SESSION *NewServerSessionEx(CEDAR *cedar, CONNECTION *c, HUB *h, char *username,
|
||||
// Generate a MAC address for IPC
|
||||
if (s->InProcMode)
|
||||
{
|
||||
char tmp[MAX_SIZE];
|
||||
char machine[MAX_SIZE];
|
||||
UCHAR hash[SHA1_SIZE];
|
||||
if (ipc_mac_address != NULL)
|
||||
{
|
||||
Copy(s->IpcMacAddress, ipc_mac_address, 6);
|
||||
}
|
||||
else
|
||||
{
|
||||
char tmp[MAX_SIZE];
|
||||
char machine[MAX_SIZE];
|
||||
UCHAR hash[SHA1_SIZE];
|
||||
|
||||
GetMachineName(machine, sizeof(machine));
|
||||
GetMachineName(machine, sizeof(machine));
|
||||
|
||||
Format(tmp, sizeof(tmp), "%s@%s@%u", machine, h->Name, s->UniqueId);
|
||||
Format(tmp, sizeof(tmp), "%s@%s@%u", machine, h->Name, s->UniqueId);
|
||||
|
||||
StrUpper(tmp);
|
||||
Trim(tmp);
|
||||
StrUpper(tmp);
|
||||
Trim(tmp);
|
||||
|
||||
Sha0(hash, tmp, StrLen(tmp));
|
||||
Sha0(hash, tmp, StrLen(tmp));
|
||||
|
||||
s->IpcMacAddress[0] = 0xCA;
|
||||
s->IpcMacAddress[1] = hash[1];
|
||||
s->IpcMacAddress[2] = hash[2];
|
||||
s->IpcMacAddress[3] = hash[3];
|
||||
s->IpcMacAddress[4] = hash[4];
|
||||
s->IpcMacAddress[5] = hash[5];
|
||||
s->IpcMacAddress[0] = 0xCA;
|
||||
s->IpcMacAddress[1] = hash[1];
|
||||
s->IpcMacAddress[2] = hash[2];
|
||||
s->IpcMacAddress[3] = hash[3];
|
||||
s->IpcMacAddress[4] = hash[4];
|
||||
s->IpcMacAddress[5] = hash[5];
|
||||
|
||||
MacToStr(tmp, sizeof(tmp), s->IpcMacAddress);
|
||||
Debug("MAC Address for IPC: %s\n", tmp);
|
||||
MacToStr(tmp, sizeof(tmp), s->IpcMacAddress);
|
||||
Debug("MAC Address for IPC: %s\n", tmp);
|
||||
}
|
||||
}
|
||||
|
||||
return s;
|
||||
|
Reference in New Issue
Block a user