]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- DHCPv4 I/O methods that failed to sense hardware address were corrected.
authorDavid Hankins <dhankins@isc.org>
Fri, 18 May 2007 17:21:46 +0000 (17:21 +0000)
committerDavid Hankins <dhankins@isc.org>
Fri, 18 May 2007 17:21:46 +0000 (17:21 +0000)
  [ISC-Bugs #16881]

- DHCPv4 is now the default (as documented) rather than DHCPv6.  The default
  was set to DHCPv6 to facilitate ease early development, and forgotten.
  [ISC-Bugs #16881]

- Corrected a segmentation violation in DHCPv4 socket processing.
  [ISC-Bugs #16881]

RELNOTES
common/bpf.c
common/discover.c
common/dlpi.c
common/lpf.c
common/socket.c

index 69a524960efdb641af9f73387ba6ecb71a4d7b4f..ae3aee1054f8bb183fb032a094b773cf33867b7f 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -67,6 +67,13 @@ the README file.
 
 - Duplicate dhclient-script updates for DHCPv6 to all provided scripts.
 
+- DHCPv4 I/O methods that failed to sense hardware address were corrected.
+
+- DHCPv4 is now the default (as documented) rather than DHCPv6.  The default
+  was set to DHCPv6 to facilitate ease early development, and forgotten.
+
+- Corrected a segmentation violation in DHCPv4 socket processing.
+
                     Changes since 3.1.0 (NEW FEATURES)
 
 - DHCPv6 Client and Server protocol support.  Use '-6' to run the daemons
index e3a4e11d8d066658a1d8e5453fb4db084eb6d90a..eb104b40ef88ec91229c4d79d3812aed07925fa3 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: bpf.c,v 1.52 2007/05/16 22:27:34 shane Exp $ Copyright (c) 2004 Internet Systems Consortium.  All rights reserved.\n";
+"$Id: bpf.c,v 1.53 2007/05/18 17:21:46 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -116,6 +116,8 @@ int if_register_bpf (info)
                log_fatal ("Can't attach interface %s to bpf device %s: %m",
                       info -> name, filename);
 
+       get_hw_addr(info->name, &info->hw_address);
+
        return sock;
 }
 #endif /* USE_BPF_SEND || USE_BPF_RECEIVE */
index 86ec835475b8567b785e06a7ac46d213fb75a5a8..83b10a7a2e818b6e3330bc75d779241fc726a55c 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: discover.c,v 1.54 2007/05/16 22:27:34 shane Exp $ Copyright (c) 2004-2006 Internet Systems Consortium.  All rights reserved.\n";
+"$Id: discover.c,v 1.55 2007/05/18 17:21:46 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -52,7 +52,7 @@ int (*dhcp_interface_shutdown_hook) (struct interface_info *);
 
 struct in_addr limited_broadcast;
 
-int local_family = AF_INET6;
+int local_family = AF_INET;
 struct in_addr local_address;
 struct in6_addr local_address6;
 
@@ -971,6 +971,24 @@ discover_interfaces(int state) {
        end_iface_scan(&ifaces);
 
 
+       /* Mock-up an 'ifp' structure which is no longer used in the
+        * new interface-sensing code, but is used in higher layers
+        * (for example to sense fallback interfaces).
+        */
+       for (tmp = interfaces ; tmp != NULL ; tmp = tmp->next) {
+               if (tmp->ifp == NULL) {
+                       struct ifreq *tif;
+
+                       tif = (struct ifreq *)dmalloc(sizeof(struct ifreq),
+                                                     MDL);
+                       if (tif == NULL)
+                               log_fatal("no space for ifp mockup.");
+                       strcpy(tif->ifr_name, tmp->name);
+                       tmp->ifp = tif;
+               }
+       }
+
+
        /* Now cycle through all the interfaces we found, looking for
           hardware addresses. */
        /* XXX: The dlpi interface code will get this information in Solaris */
index 7c0b3ccdb416334ecc6dd2f6a1935edf3f506cb7..59a7b2231ee968674e88879d95d29abcad14f0ba 100644 (file)
@@ -87,7 +87,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: dlpi.c,v 1.31 2007/05/08 23:05:20 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium.  All rights reserved.\n";
+"$Id: dlpi.c,v 1.32 2007/05/18 17:21:46 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -294,6 +294,8 @@ int if_register_dlpi (info)
        }
 #endif
 
+       get_hw_addr(info->name, &info->hw_address);
+
        return sock;
 }
 
index f9d256b34d4a417d3a50ca83d0a3fc7703a66de0..ed84fd6588ff181f42c2eeb3aa354d50521eb688 100644 (file)
@@ -28,7 +28,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: lpf.c,v 1.33 2007/05/16 22:27:34 shane Exp $ Copyright (c) 2004 Internet Systems Consortium.  All rights reserved.\n";
+"$Id: lpf.c,v 1.34 2007/05/18 17:21:46 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -108,6 +108,8 @@ int if_register_lpf (info)
                log_fatal ("Bind socket to interface: %m");
        }
 
+       get_hw_addr(info->name, &info->hw_address);
+
        return sock;
 }
 #endif /* USE_LPF_SEND || USE_LPF_RECEIVE */
index ea103920320f90db99890cff3e8d50ab60b1eb08..16acd17bb7c864c69cdc1c609df9f4a4caa5e134 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: socket.c,v 1.63 2007/05/17 18:27:11 dhankins Exp $ "
+"$Id: socket.c,v 1.64 2007/05/18 17:21:46 dhankins Exp $ "
 "Copyright (c) 2004-2006 Internet Systems Consortium.\n";
 #endif /* not lint */
 
@@ -244,6 +244,8 @@ if_register_socket(struct interface_info *info, int family, int do_multicast) {
                }
        }
 
+       get_hw_addr(info->name, &info->hw_address);
+
        return sock;
 }
 #endif /* USE_SOCKET_SEND || USE_SOCKET_RECEIVE || USE_SOCKET_FALLBACK */
@@ -324,7 +326,6 @@ void
 if_register6(struct interface_info *info, int do_multicast) {
        info->rfdesc = if_register_socket(info, AF_INET6, do_multicast);
        info->wfdesc = info->rfdesc;
-       get_hw_addr(info->name, &info->hw_address);
        if (!quiet_interface_discovery) {
                if (info->shared_network != NULL) {
                        log_info("Listening on Socket/%s/%s", info->name,