Getting loopback IP address from GetLocalAddressList. #494
Labels
Element: Socket Stacks
Issues related to OS socket APIs, TIdStack and TIdSocketList descedants, etc
Status: Review Needed
Issue needs further review to decide next status
Type: Enhancement
Issue is proposing a new feature/enhancement
Milestone
Does anyone know why the loopback IP address (127.0.0.1) is intentionally filtered out in the procedures:
if (LAddrInfo^.ifa_addr <> nil) and ((LAddrInfo^.ifa_flags and IFF_LOOPBACK) = 0) then
if (Adapter.IfType <> IF_TYPE_SOFTWARE_LOOPBACK) and ((Adapter.Flags and IP_ADAPTER_RECEIVE_ONLY) = 0) then
?
Without these conditions, it correctly fetches all IP addresses, including the loopback IP address. Tested on Windows, Linux and macOS.
The text was updated successfully, but these errors were encountered: