]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Fix case where dynamic BOOTP for a known client with no applicable fixed address...
authorTed Lemon <source@isc.org>
Tue, 31 Dec 1996 02:00:33 +0000 (02:00 +0000)
committerTed Lemon <source@isc.org>
Tue, 31 Dec 1996 02:00:33 +0000 (02:00 +0000)
bootp.c
server/bootp.c

diff --git a/bootp.c b/bootp.c
index fc983f112e6e4eb42966e0670191ed4fbf0c23e6..d2855705160191ba70ce9963d924068496c88195 100644 (file)
--- 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,
index fc983f112e6e4eb42966e0670191ed4fbf0c23e6..d2855705160191ba70ce9963d924068496c88195 100644 (file)
@@ -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,