diff options
| author | Roy Marples <roy@marples.name> | 2008-09-17 13:09:30 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-09-17 13:09:30 +0000 |
| commit | f7038ab8b9bcd3bb651d7decbfba3744b00a1c81 (patch) | |
| tree | 2009d1c36208091203a5c88824c8e630f2df4aae /eloop.c | |
| parent | 5c39a95174cf4fa01fece35c6fbd67c13a39cf2b (diff) | |
| download | dhcpcd-f7038ab8b9bcd3bb651d7decbfba3744b00a1c81.tar.xz | |
As we now use times to trigger again instead of decreasing timers, ensure our lease fits. We may wish to revisit this again if we need decreasing timers once more.
Diffstat (limited to 'eloop.c')
| -rw-r--r-- | eloop.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -117,6 +117,11 @@ add_timeout_tv(const struct timeval *when, get_monotonic(&now); timeradd(&now, when, &w); + /* Check for time_t overflow. */ + if (timercmp(&w, &now, <)) { + errno = ERANGE; + return; + } /* Remove existing timeout if present */ for (t = timeouts; t; t = t->next) { |
