]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- Don't force the lease to be default-lease-time seconds long if
authorTed Lemon <source@isc.org>
Thu, 8 Jun 2000 21:22:48 +0000 (21:22 +0000)
committerTed Lemon <source@isc.org>
Thu, 8 Jun 2000 21:22:48 +0000 (21:22 +0000)
  the client requested a lease shorter than MCLT of a failover peer.

server/dhcp.c

index fdcab86059c562062b95e958b5f63d681ab5ec57..5d8ad5d6064b073833ef8743b1b431772ad5622c 100644 (file)
@@ -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.  */