summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2000-06-30 19:04:52 +0000
committerTed Lemon <source@isc.org>2000-06-30 19:04:52 +0000
commitc5ec97d59aac776da1c90fd266c29d6590e6b7b3 (patch)
tree33f23ad2aa745bda654c64195ebf13b1b399a4ec
parent17dc096b0ce89b799e80a30451c74d297d3b4ea1 (diff)
downloadisc-dhcp-c5ec97d59aac776da1c90fd266c29d6590e6b7b3.tar.gz
- Fix a bug introduced in the previous patch where the lease pointer might
not be initialized as a result of a malformed DHCPRELEASE.
-rw-r--r--server/dhcp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/server/dhcp.c b/server/dhcp.c
index ba33d780..e901f724 100644
--- a/server/dhcp.c
+++ b/server/dhcp.c
@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dhcp.c,v 1.57.2.30 2000/06/24 07:25:56 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dhcp.c,v 1.57.2.31 2000/06/30 19:04:52 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -396,14 +396,11 @@ void dhcprelease (packet)
/* The client is supposed to pass a valid client-identifier,
but the spec on this has changed historically, so try the
IP address in ciaddr if the client-identifier fails. */
- if (!lease) {
- cip.len = 4;
- memcpy (cip.iabuf, &packet -> raw -> ciaddr, 4);
- lease = find_lease_by_ip_addr (cip);
- }
+ cip.len = 4;
+ memcpy (cip.iabuf, &packet -> raw -> ciaddr, 4);
+ lease = find_lease_by_ip_addr (cip);
}
-
note ("DHCPRELEASE of %s from %s via %s (%sfound)",
inet_ntoa (packet -> raw -> ciaddr),
print_hw_addr (packet -> raw -> htype,