diff --git a/network_interface.nim b/network_interface.nim index c383d5f..b213496 100644 --- a/network_interface.nim +++ b/network_interface.nim @@ -37,7 +37,7 @@ proc fromIpAddress*(address: IpAddress): NetworkInterface = it.ifa_addr.sa_family.cint == AF_INET6) and $address == it.ifa_addr.getAddrString(): result.ipAddress = address - result.netMask = parseIpAddress(it.ifa_addr.getAddrString()) + result.netMask = parseIpAddress(it.ifa_netmask.getAddrString()) result.name = $it.ifa_name result.index = if_nametoindex(result.name).cint result.flags = it.ifa_flags