Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/usr.sbin/dhcp/server Pull up 1.9 (patchlevel 25)
details: https://anonhg.NetBSD.org/src/rev/db15fb74bb06
branches: netbsd-1-4
changeset: 468157:db15fb74bb06
user: mellon <mellon%NetBSD.org@localhost>
date: Fri Apr 09 20:09:59 1999 +0000
description:
Pull up 1.9 (patchlevel 25)
diffstat:
usr.sbin/dhcp/server/dhcp.c | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diffs (56 lines):
diff -r 9f10d14f79e1 -r db15fb74bb06 usr.sbin/dhcp/server/dhcp.c
--- a/usr.sbin/dhcp/server/dhcp.c Fri Apr 09 20:09:21 1999 +0000
+++ b/usr.sbin/dhcp/server/dhcp.c Fri Apr 09 20:09:59 1999 +0000
@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dhcp.c,v 1.8 1999/03/29 23:08:23 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dhcp.c,v 1.8.2.1 1999/04/09 20:09:59 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -314,15 +314,16 @@
}
/* If we're not allowed to serve this client anymore, don't. */
- if (!lease -> host &&
+ if (lease &&
+ !lease -> host &&
!lease -> subnet -> group -> boot_unknown_clients) {
note ("Ignoring unknown client %s",
print_hw_addr (packet -> raw -> htype,
packet -> raw -> hlen,
packet -> raw -> chaddr));
return;
- } else if (lease -> host &&
- !lease -> host -> group -> allow_booting) {
+ } else if (lease && lease -> host &&
+ !lease -> host -> group -> allow_booting) {
note ("Declining to renew client %s",
lease -> host -> name
? lease -> host -> name
@@ -449,6 +450,7 @@
unsigned char nak = DHCPNAK;
struct packet outgoing;
struct hardware hto;
+ int i;
struct tree_cache *options [256];
struct tree_cache dhcpnak_tree;
@@ -476,9 +478,12 @@
options [DHO_DHCP_MESSAGE] -> tree = (struct tree *)0;
/* Do not use the client's requested parameter list. */
- packet -> options [DHO_DHCP_PARAMETER_REQUEST_LIST].len = 0;
- packet -> options [DHO_DHCP_PARAMETER_REQUEST_LIST].data =
- (unsigned char *)0;
+ i = DHO_DHCP_PARAMETER_REQUEST_LIST;
+ if (packet -> options [i].data) {
+ packet -> options [i].len = 0;
+ dfree (packet -> options [i].data, "nak_lease");
+ packet -> options [i].data = (unsigned char *)0;
+ }
/* Set up the option buffer... */
outgoing.packet_length =
Home |
Main Index |
Thread Index |
Old Index