diff --git a/Net/src/NetworkInterface.cpp b/Net/src/NetworkInterface.cpp index ca6343b0d..ca7021f65 100644 --- a/Net/src/NetworkInterface.cpp +++ b/Net/src/NetworkInterface.cpp @@ -905,20 +905,20 @@ NetworkInterface::NetworkInterfaceList NetworkInterface::list() int ifIndex(-1); if (currIface->ifa_addr) { - switch (currIface->ifa_addr->sa_family) - { - case AF_INET6: - ifIndex = if_nametoindex(currIface->ifa_name); - addr = IPAddress(&reinterpret_cast(currIface->ifa_addr)->sin6_addr, sizeof(struct in6_addr), ifIndex); - haveAddr = true; - break; - case AF_INET: - addr = IPAddress(*(currIface->ifa_addr)); - haveAddr = true; - break; - default: - break; - } + switch (currIface->ifa_addr->sa_family) + { + case AF_INET6: + ifIndex = if_nametoindex(currIface->ifa_name); + addr = IPAddress(&reinterpret_cast(currIface->ifa_addr)->sin6_addr, sizeof(struct in6_addr), ifIndex); + haveAddr = true; + break; + case AF_INET: + addr = IPAddress(*(currIface->ifa_addr)); + haveAddr = true; + break; + default: + break; + } } if (haveAddr) {