summaryrefslogtreecommitdiffhomepage
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
authorRuss Dill <Russ.Dill@asu.edu>2004-05-19 08:29:05 +0000
committerRuss Dill <Russ.Dill@asu.edu>2004-05-19 08:29:05 +0000
commit309c7b71e66f45225f369591caf2441bfa2d1670 (patch)
tree364fc965115e6ba6010ec150f29334af25b159ee /networking/udhcp/dhcpc.c
parent91e006c1adf660a0180b6d3988a14150ccb36fa9 (diff)
fix timewarp in client (server fix later)
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index dda678933..449b51763 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -188,7 +188,7 @@ int main(int argc, char *argv[])
int c, len;
struct dhcpMessage packet;
struct in_addr temp_addr;
- time_t now;
+ long now;
int max_fd;
int sig;
@@ -290,7 +290,7 @@ int main(int argc, char *argv[])
for (;;) {
- tv.tv_sec = timeout - time(0);
+ tv.tv_sec = timeout - uptime();
tv.tv_usec = 0;
if (listen_mode != LISTEN_NONE && fd < 0) {
@@ -310,7 +310,7 @@ int main(int argc, char *argv[])
retval = select(max_fd + 1, &rfds, NULL, NULL, &tv);
} else retval = 0; /* If we already timed out, fall through */
- now = time(0);
+ now = uptime();
if (retval == 0) {
/* timeout dropped to zero */
switch (state) {