diff options
author | Russ Dill | 2004-05-19 08:29:05 +0000 |
---|---|---|
committer | Russ Dill | 2004-05-19 08:29:05 +0000 |
commit | 309c7b71e66f45225f369591caf2441bfa2d1670 (patch) | |
tree | 364fc965115e6ba6010ec150f29334af25b159ee /networking/udhcp/arpping.c | |
parent | 91e006c1adf660a0180b6d3988a14150ccb36fa9 (diff) | |
download | busybox-309c7b71e66f45225f369591caf2441bfa2d1670.zip busybox-309c7b71e66f45225f369591caf2441bfa2d1670.tar.gz |
fix timewarp in client (server fix later)
Diffstat (limited to 'networking/udhcp/arpping.c')
-rw-r--r-- | networking/udhcp/arpping.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/udhcp/arpping.c b/networking/udhcp/arpping.c index ab4c6d2..7cc2be4 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"); |