Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/dhcp/client - If we find a lease in the lease file that...
details: https://anonhg.NetBSD.org/src/rev/a92c5a6a702b
branches: trunk
changeset: 565180:a92c5a6a702b
user: mellon <mellon%NetBSD.org@localhost>
date: Wed Mar 31 19:05:18 2004 +0000
description:
- If we find a lease in the lease file that matches a predefined lease,
and it's expiry time is earlier than the expiry on the predefined lease,
don't nuke the predefined lease.
diffstat:
dist/dhcp/client/clparse.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (26 lines):
diff -r e94ab6d9d1fc -r a92c5a6a702b dist/dhcp/client/clparse.c
--- a/dist/dhcp/client/clparse.c Wed Mar 31 18:01:07 2004 +0000
+++ b/dist/dhcp/client/clparse.c Wed Mar 31 19:05:18 2004 +0000
@@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
-"$Id: clparse.c,v 1.6 2004/03/30 19:39:39 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: clparse.c,v 1.7 2004/03/31 19:05:18 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -914,6 +914,13 @@
if (lp -> address.len == lease -> address.len &&
!memcmp (lp -> address.iabuf, lease -> address.iabuf,
lease -> address.len)) {
+ /* If the lease we found is a static lease, and
+ this one expires earlier, discard this one. */
+ if (lp->is_static &&
+ lp->expiry > lease->expiry) {
+ destroy_client_lease(lease);
+ return;
+ }
if (pl)
pl -> next = next;
else
Home |
Main Index |
Thread Index |
Old Index