mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-23 01:49:53 +03:00
Merge pull request #511 from dnobori/b4_mac
Improving the compliance of Virtual Network Adapters with the local address bit of the MAC address rule.
This commit is contained in:
commit
ab54b73737
@ -431,7 +431,7 @@ void CiChangeAllVLanMacAddress(CLIENT *c)
|
|||||||
RPC_CLIENT_ENUM_VLAN_ITEM *e = t.Items[i];
|
RPC_CLIENT_ENUM_VLAN_ITEM *e = t.Items[i];
|
||||||
UCHAR mac[6];
|
UCHAR mac[6];
|
||||||
|
|
||||||
if (StrToMac(mac, e->MacAddress) && mac[1] == 0xAC)
|
if (StrToMac(mac, e->MacAddress) && ((mac[0] == 0x00 && mac[1] == 0xAC) || (mac[0] == 0x5E)))
|
||||||
{
|
{
|
||||||
char *name = e->DeviceName;
|
char *name = e->DeviceName;
|
||||||
RPC_CLIENT_SET_VLAN s;
|
RPC_CLIENT_SET_VLAN s;
|
||||||
|
@ -10306,12 +10306,12 @@ void GenMacAddress(UCHAR *mac)
|
|||||||
Hash(hash, b->Buf, b->Size, true);
|
Hash(hash, b->Buf, b->Size, true);
|
||||||
|
|
||||||
// Generate a MAC address
|
// Generate a MAC address
|
||||||
mac[0] = 0x00;
|
mac[0] = 0x5E;
|
||||||
mac[1] = 0xAC; // AC hurray
|
mac[1] = hash[0];
|
||||||
mac[2] = hash[0];
|
mac[2] = hash[1];
|
||||||
mac[3] = hash[1];
|
mac[3] = hash[2];
|
||||||
mac[4] = hash[2];
|
mac[4] = hash[3];
|
||||||
mac[5] = hash[3];
|
mac[5] = hash[4];
|
||||||
|
|
||||||
FreeBuf(b);
|
FreeBuf(b);
|
||||||
}
|
}
|
||||||
|
@ -10509,12 +10509,12 @@ void MsGenMacAddress(UCHAR *mac)
|
|||||||
|
|
||||||
Hash(hash, hash_src, sizeof(hash_src), true);
|
Hash(hash, hash_src, sizeof(hash_src), true);
|
||||||
|
|
||||||
mac[0] = 0x00;
|
mac[0] = 0x5E;
|
||||||
mac[1] = 0xAC;
|
mac[1] = hash[0];
|
||||||
mac[2] = hash[0];
|
mac[2] = hash[1];
|
||||||
mac[3] = hash[1];
|
mac[3] = hash[2];
|
||||||
mac[4] = hash[2];
|
mac[4] = hash[3];
|
||||||
mac[5] = hash[3];
|
mac[5] = hash[4];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finish the driver installation
|
// Finish the driver installation
|
||||||
|
Loading…
Reference in New Issue
Block a user