]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Pull up relevant portions of 1.60
authorTed Lemon <source@isc.org>
Mon, 29 Jun 1998 20:40:47 +0000 (20:40 +0000)
committerTed Lemon <source@isc.org>
Mon, 29 Jun 1998 20:40:47 +0000 (20:40 +0000)
server/dhcp.c

index 79b1111eccffc7254bd963077107531f1676c8a0..56bfc41f45011a366cd312bd5a75a21da3dd0413 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: dhcp.c,v 1.57.2.6 1998/06/29 20:38:15 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: dhcp.c,v 1.57.2.7 1998/06/29 20:40:47 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -162,7 +162,11 @@ void dhcpdiscover (packet)
        } else if (lease -> host &&
                    !lease -> host -> group -> allow_booting) {
                note ("Declining to boot client %s",
-                     lease -> host -> name);
+                     lease -> host -> name
+                     ? lease -> host -> name
+                     : print_hw_addr (packet -> raw -> htype,
+                                      packet -> raw -> hlen,
+                                      packet -> raw -> chaddr));
        } else
                ack_lease (packet, lease, DHCPOFFER, cur_time + 120);
 }
@@ -1268,11 +1272,12 @@ struct lease *find_lease (packet, share, ours)
                    ip_lease -> uid_len ==  packet -> options [i].len &&
                    !memcmp (packet -> options [i].data,
                             ip_lease -> uid, ip_lease -> uid_len)) {
-                       warn ("client %s has duplicate leases on %s",
-                             print_hw_addr (packet -> raw -> htype,
-                                            packet -> raw -> hlen,
-                                            packet -> raw -> chaddr),
-                             ip_lease -> shared_network -> name);
+                       if (uid_lease -> ends > cur_time)
+                               warn ("client %s has duplicate leases on %s",
+                                     print_hw_addr (packet -> raw -> htype,
+                                                    packet -> raw -> hlen,
+                                                    packet -> raw -> chaddr),
+                                     ip_lease -> shared_network -> name);
                        uid_lease = ip_lease;
                }
                ip_lease = (struct lease *)0;