On 23/07/2020 02:52, Nikola Grcevski wrote:
Hi Alex,

Yes, you are right about that. I didn't think about extending the check to more 
than 127.0.0.1.

The existing macro was only testing for 127.0.0.1 in both IP4 and IP6 modes, so 
if the consensus
is that we want to extend to all of the possible loopback addresses, I can 
modify the macro to add
AND operations to clear the bits before we compare. It would require that we 
make our own
macro for ::1/128, since the Windows SDK only tests for ::1 in 
IN6_IS_ADDR_LOOPBACK.

Alex makes a good point because 127.0.0.0/8 is reserved for the loopback. It's okay to separate this out as a separate improvement if you want.

-Alan.

Reply via email to