Description
(to not lose track of it - it seems an helper function - I don't find an equivalence on tcpip.sys of Windows 2k3)
Tracking with WinDBG, the connection performed by SoftEther VPN (vpngate-client-v4.39-9774-beta-2022.04.29.exe)
UINT AddrCountPrefixBits( PIP_ADDRESS Netmask ) { |
UINT Prefix = 0; |
if( Netmask->Type == IP_ADDRESS_V4 ) { |
ULONG BitTest = 0x80000000; |
|
/* The mask has been read in network order. Put it in host order |
* in order to scan it. */
|
|
ULONG TestMask = IPv4NToHl(Netmask->Address.IPv4Address); //LOCALS SAYS MASK IS 255.255.255.255 0xfffffff |
|
while( (BitTest & TestMask) == BitTest ) { |
Prefix++; <-- BREAKPOINT 1 - IT HITS
|
BitTest >>= 1; <-- BREAKPOINT 2 - IT HITS - DEBUG LOCAL SAYS IT HAS SHIFTED TO 0
|
}
|
return Prefix; <-- BREAKPOINT 3 - IT NEVER HITS AND PREFIX KEEPS INCREASING |
} else { |
TI_DbgPrint(DEBUG_DATALINK, ("Don't know address type %d\n", |
Netmask->Type));
|
return 0; |
}
|
}
|
Workaround I have adopted: treated 255.255.255.255 as edge case and early returned 32.