From 309c7b71e66f45225f369591caf2441bfa2d1670 Mon Sep 17 00:00:00 2001 From: Russ Dill Date: Wed, 19 May 2004 08:29:05 +0000 Subject: fix timewarp in client (server fix later) --- networking/udhcp/arpping.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'networking/udhcp/arpping.c') diff --git a/networking/udhcp/arpping.c b/networking/udhcp/arpping.c index ab4c6d20c..7cc2be42e 100644 --- a/networking/udhcp/arpping.c +++ b/networking/udhcp/arpping.c @@ -79,7 +79,7 @@ int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *mac, char *interface) /* wait arp reply, and check it */ tm.tv_usec = 0; - time(&prevTime); + prevTime = uptime(); while (timeout > 0) { FD_ZERO(&fdset); FD_SET(s, &fdset); @@ -97,8 +97,8 @@ int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *mac, char *interface) break; } } - timeout -= time(NULL) - prevTime; - time(&prevTime); + timeout -= uptime() - prevTime; + prevTime = uptime(); } close(s); DEBUG(LOG_INFO, "%salid arp replies for this address", rv ? "No v" : "V"); -- cgit v1.2.3