From: Ted Lemon Date: Thu, 8 Jun 2000 21:22:48 +0000 (+0000) Subject: - Don't force the lease to be default-lease-time seconds long if X-Git-Tag: V3-BETA-2-PATCH-1~161 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9efd3acc65397a9c4b3709162b6029d7dd31772b;p=thirdparty%2Fdhcp.git - Don't force the lease to be default-lease-time seconds long if the client requested a lease shorter than MCLT of a failover peer. --- diff --git a/server/dhcp.c b/server/dhcp.c index fdcab8605..5d8ad5d60 100644 --- a/server/dhcp.c +++ b/server/dhcp.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: dhcp.c,v 1.152 2000/06/06 23:59:18 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; +"$Id: dhcp.c,v 1.153 2000/06/08 21:22:48 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1639,7 +1639,8 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp) XXX the peer's expiry time for this lease up XXX by a few seconds - think about this again XXX later. */ - if (cur_time + lease_time > lease -> tsfp) { + if (lease_time > peer -> mclt && + cur_time + lease_time > lease -> tsfp) { /* Here we're assuming that if we don't have to update tstp, there's already an update queued. May want to revisit this. */