Commit 4ba58919 authored by David Hankins's avatar David Hankins
Browse files

- DHCPv4 I/O methods that failed to sense hardware address were corrected.

  [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]
parent f66f02cc
......@@ -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
......
......@@ -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 */
......
......@@ -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 */
......
......@@ -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;
}
......
......@@ -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 */
......
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment