From: Ted Lemon Date: Tue, 31 Dec 1996 02:00:33 +0000 (+0000) Subject: Fix case where dynamic BOOTP for a known client with no applicable fixed address... X-Git-Tag: DHCP_970222~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=352bc292abb6f445f27797709ac5caa5cb187afa;p=thirdparty%2Fdhcp.git Fix case where dynamic BOOTP for a known client with no applicable fixed address was failing --- diff --git a/bootp.c b/bootp.c index fc983f112..d28557051 100644 --- a/bootp.c +++ b/bootp.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: bootp.c,v 1.20 1996/11/08 20:08:34 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: bootp.c,v 1.21 1996/12/31 02:00:33 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -100,6 +100,7 @@ void bootp (packet) for (; hp; hp = hp -> n_ipaddr) { if (!hp -> fixed_addr) { host = hp; + break; } } } @@ -107,8 +108,8 @@ void bootp (packet) /* If we've been told not to boot unknown clients, and we didn't find any host record for this client, ignore it. */ - if (!hp && !(packet -> shared_network -> - group -> boot_unknown_clients)) { + if (!host && !(packet -> shared_network -> + group -> boot_unknown_clients)) { note ("Ignoring unknown BOOTP client %s via %s", print_hw_addr (packet -> raw -> htype, packet -> raw -> hlen, diff --git a/server/bootp.c b/server/bootp.c index fc983f112..d28557051 100644 --- a/server/bootp.c +++ b/server/bootp.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: bootp.c,v 1.20 1996/11/08 20:08:34 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: bootp.c,v 1.21 1996/12/31 02:00:33 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -100,6 +100,7 @@ void bootp (packet) for (; hp; hp = hp -> n_ipaddr) { if (!hp -> fixed_addr) { host = hp; + break; } } } @@ -107,8 +108,8 @@ void bootp (packet) /* If we've been told not to boot unknown clients, and we didn't find any host record for this client, ignore it. */ - if (!hp && !(packet -> shared_network -> - group -> boot_unknown_clients)) { + if (!host && !(packet -> shared_network -> + group -> boot_unknown_clients)) { note ("Ignoring unknown BOOTP client %s via %s", print_hw_addr (packet -> raw -> htype, packet -> raw -> hlen,