aboutsummaryrefslogtreecommitdiff
path: root/ping.nim
diff options
context:
space:
mode:
Diffstat (limited to 'ping.nim')
-rw-r--r--ping.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/ping.nim b/ping.nim
index b09d5f1..dd41882 100644
--- a/ping.nim
+++ b/ping.nim
@@ -217,11 +217,11 @@ proc initPingMonitor*(target: IpAddress, ident: uint16): PingMonitor =
217 PingMonitor( 217 PingMonitor(
218 socket: newSocket(domain, SOCK_RAW, proto), 218 socket: newSocket(domain, SOCK_RAW, proto),
219 target: target, 219 target: target,
220 source: getPrimaryIPAddr(target),
221 ident: ident, 220 ident: ident,
222 ) 221 )
223 222
224func buildEchoRequest(mon: PingMonitor): ICMPPacket = 223proc buildEchoRequest(mon: PingMonitor): ICMPPacket =
224 mon.source = getPrimaryIPAddr(dest=mon.target)
225 buildEchoRequest(mon.source, mon.target, mon.ident, mon.seqNum, mon.payload) 225 buildEchoRequest(mon.source, mon.target, mon.ident, mon.seqNum, mon.payload)
226 226
227proc sendEchoRequest(mon: PingMonitor, timeout: Duration) = 227proc sendEchoRequest(mon: PingMonitor, timeout: Duration) =