actually store netmask
This commit is contained in:
parent
4f64b7be53
commit
73a22c0816
|
@ -37,7 +37,7 @@ proc fromIpAddress*(address: IpAddress): NetworkInterface =
|
||||||
it.ifa_addr.sa_family.cint == AF_INET6) and
|
it.ifa_addr.sa_family.cint == AF_INET6) and
|
||||||
$address == it.ifa_addr.getAddrString():
|
$address == it.ifa_addr.getAddrString():
|
||||||
result.ipAddress = address
|
result.ipAddress = address
|
||||||
result.netMask = parseIpAddress(it.ifa_addr.getAddrString())
|
result.netMask = parseIpAddress(it.ifa_netmask.getAddrString())
|
||||||
result.name = $it.ifa_name
|
result.name = $it.ifa_name
|
||||||
result.index = if_nametoindex(result.name).cint
|
result.index = if_nametoindex(result.name).cint
|
||||||
result.flags = it.ifa_flags
|
result.flags = it.ifa_flags
|
||||||
|
|
Loading…
Reference in New Issue