1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-15 20:25:00 +03:00

Change IP structure so that IPv4 addresses are stored in RFC3493 format

In addition to saving 4 bytes for each instantiation, this change makes IP-related operations faster and clearer.

https://tools.ietf.org/html/rfc3493.html#section-3.7
This commit is contained in:
Davide Beatrici
2021-04-07 21:24:55 +02:00
parent 01663f836d
commit 1708998a11
21 changed files with 295 additions and 403 deletions

View File

@ -1207,7 +1207,7 @@ void NicInfoRefresh(HWND hWnd, UI_NICINFO *info)
{
Copy(&ip, &a->IpAddresses[i], sizeof(IP));
if (!(ip.addr[0] == 169 && ip.addr[1] == 254))
if (!(IPV4(ip.address)[0] == 169 && IPV4(ip.address)[1] == 254))
{
has_ip = true;
}