diff options
author | Denis Vlasenko | 2009-02-02 10:48:06 +0000 |
---|---|---|
committer | Denis Vlasenko | 2009-02-02 10:48:06 +0000 |
commit | 04158e04591efea20f34c8dc83002e19056a5590 (patch) | |
tree | 1deace5081207ddefa831e024e5914a11a8aaeeb /networking/udhcp/dhcpd.c | |
parent | 512c8ae0537ad2ffcb70db03ca50b532781ae799 (diff) | |
download | busybox-04158e04591efea20f34c8dc83002e19056a5590.zip busybox-04158e04591efea20f34c8dc83002e19056a5590.tar.gz |
udhcpd: add code which rejects lease files with suspicious or old timestamp.
*: s/time(0)/time(NULL)/g
Diffstat (limited to 'networking/udhcp/dhcpd.c')
-rw-r--r-- | networking/udhcp/dhcpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c index d0a1eba..ebf3017 100644 --- a/networking/udhcp/dhcpd.c +++ b/networking/udhcp/dhcpd.c @@ -255,13 +255,13 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv) DEBUG("Received DECLINE"); if (lease) { memset(lease->chaddr, 0, 16); - lease->expires = time(0) + server_config.decline_time; + lease->expires = time(NULL) + server_config.decline_time; } break; case DHCPRELEASE: DEBUG("Received RELEASE"); if (lease) - lease->expires = time(0); + lease->expires = time(NULL); break; case DHCPINFORM: DEBUG("Received INFORM"); |