From 73a22c0816b0fe97d2b128b0bc6dc653e8747c69 Mon Sep 17 00:00:00 2001 From: Christian Ulrich Date: Sat, 25 Jul 2020 12:00:21 +0200 Subject: [PATCH] actually store netmask --- network_interface.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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