fix timewarp in client (server fix later)

This commit is contained in:
Russ Dill
2004-05-19 08:29:05 +00:00
parent 91e006c1ad
commit 309c7b71e6
4 changed files with 16 additions and 6 deletions

View File

@@ -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");