aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpd.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-02-02 10:48:06 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-02-02 10:48:06 +0000
commit04158e04591efea20f34c8dc83002e19056a5590 (patch)
tree1deace5081207ddefa831e024e5914a11a8aaeeb /networking/udhcp/dhcpd.c
parent512c8ae0537ad2ffcb70db03ca50b532781ae799 (diff)
downloadbusybox-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index d0a1eba81..ebf30178a 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");