diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2012-08-18 00:20:02 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2012-08-18 00:20:02 +0000 |
commit | ae5e4cda044ab44688d1d88b0ccd026a0ecc7511 (patch) | |
tree | 277c57251fd2e2a48ad9aadcf54e085a48a2a895 /sbin/dhclient/dispatch.c | |
parent | a76ccdf52d95be225350e5286e4ef06790d88bba (diff) |
Update global cur_time after exiting poll() and before calling the
state engine for packet processing. Time may have passed! Use cur_time
in routing message processing.
Makes sense to todd@
Diffstat (limited to 'sbin/dhclient/dispatch.c')
-rw-r--r-- | sbin/dhclient/dispatch.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c index 1ca9fa84e8e..c117479bd7e 100644 --- a/sbin/dhclient/dispatch.c +++ b/sbin/dhclient/dispatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dispatch.c,v 1.53 2012/07/26 18:42:58 krw Exp $ */ +/* $OpenBSD: dispatch.c,v 1.54 2012/08/18 00:20:01 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -174,6 +174,9 @@ another: /* Wait for a packet or a timeout... XXX */ count = poll(fds, 2, to_msec); + /* Time may have moved on while we polled! */ + time(&cur_time); + /* Not likely to be transitory... */ if (count == -1) { if (errno == EAGAIN || errno == EINTR) { |