]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Do memcpy inside of if statement since results are only used there. Add ns_inaddr_l...
authorTed Lemon <source@isc.org>
Tue, 17 Mar 1998 06:11:25 +0000 (06:11 +0000)
committerTed Lemon <source@isc.org>
Tue, 17 Mar 1998 06:11:25 +0000 (06:11 +0000)
common/memory.c

index 96deb9dff11d8517b2bd587dc86886474d020705..7e4af6bbd1146e9600b70cbeedb3d11e4e35f064 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: memory.c,v 1.36 1998/03/16 06:13:18 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: memory.c,v 1.37 1998/03/17 06:11:25 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -273,9 +273,15 @@ void new_address_range (low, high, subnet, dynamic)
                address_range [i].shared_network = share;
                address_range [i].flags = dynamic ? DYNAMIC_BOOTP_OK : 0;
 
-               memcpy (&ia, address_range [i].ip_addr.iabuf, 4);
-
                if (subnet -> group -> get_lease_hostnames) {
+                       /* XXX This is how we want it done. */
+#if 0
+                       ns_inaddr_lookup (address_range [i].ip_addr, 0);
+#endif
+                       
+                       /* XXX This is how it's done now. */
+                       memcpy (&ia, address_range [i].ip_addr.iabuf, 4);
+
                        h = gethostbyaddr ((char *)&ia, sizeof ia, AF_INET);
                        if (!h)
                                warn ("No hostname for %s", inet_ntoa (ia));