cosmetic
This commit is contained in:
parent
73a22c0816
commit
f23093fd69
|
@ -42,7 +42,7 @@ proc isPrivateIp(ip: IpAddress): bool =
|
||||||
proc isInNetwork(ip: IpAddress, iface: NetworkInterface): bool =
|
proc isInNetwork(ip: IpAddress, iface: NetworkInterface): bool =
|
||||||
let ipScalar = htonl(cast[uint32](ip.address_v4))
|
let ipScalar = htonl(cast[uint32](ip.address_v4))
|
||||||
let ifaceIpScalar = htonl(cast[uint32](iface.ipAddress.address_v4))
|
let ifaceIpScalar = htonl(cast[uint32](iface.ipAddress.address_v4))
|
||||||
let netmaskScalar = htonl(cast[uint32](iface.netmask.address_v4))
|
let netmaskScalar = htonl(cast[uint32](iface.netMask.address_v4))
|
||||||
(ipScalar and netmaskScalar) == (ifaceIpScalar and netmaskScalar)
|
(ipScalar and netmaskScalar) == (ifaceIpScalar and netmaskScalar)
|
||||||
|
|
||||||
proc probePublicIp(): Future[IpAddress] {.async.} =
|
proc probePublicIp(): Future[IpAddress] {.async.} =
|
||||||
|
|
Loading…
Reference in New Issue