matching billing class tried before failing to provide a billing.
[ISC-Bugs #21759]
+- A problem with missing get_hw_addr function when --enable-use-sockets
+ was used is now solved on GNU/Linux, BSD and GNU/Hurd systems. Note
+ that use-sockets feature was not tested on those systems. Client and
+ server code no longer use MAX_PATH constant that is not defined on
+ GNU/Hurd systems. [ISC-Bugs 25979]
+
Changes since 4.2.4
- Correct code to calculate timing values in client to compare
* to be reopened after chdir() has been called
*/
if (path_dhclient_db[0] != '/') {
- char *path = dmalloc(PATH_MAX, MDL);
- if (path == NULL)
- log_fatal("No memory for filename\n");
- path_dhclient_db = realpath(path_dhclient_db, path);
+ const char *old_path = path_dhclient_db;
+ path_dhclient_db = realpath(path_dhclient_db, NULL);
if (path_dhclient_db == NULL)
- log_fatal("%s: %s", path, strerror(errno));
+ log_fatal("Failed to get realpath for %s: %s", old_path, strerror(errno));
}
if (path_dhclient_script[0] != '/') {
- char *path = dmalloc(PATH_MAX, MDL);
- if (path == NULL)
- log_fatal("No memory for filename\n");
- path_dhclient_script = realpath(path_dhclient_script, path);
+ const char *old_path = path_dhclient_script;
+ path_dhclient_script = realpath(path_dhclient_script, NULL);
if (path_dhclient_script == NULL)
- log_fatal("%s: %s", path, strerror(errno));
+ log_fatal("Failed to get realpath for %s: %s", old_path, strerror(errno));
}
/*
BPF socket interface code, originally contributed by Archie Cobbs. */
/*
- * Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009,2012 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004,2007 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
# include <sys/ioctl.h>
# include <sys/uio.h>
# include <net/bpf.h>
-# include <net/if_types.h>
# if defined (NEED_OSF_PFILT_HACKS)
# include <net/pfilt.h>
# endif
#include "includes/netinet/if_ether.h"
#endif
-#ifdef USE_BPF_RECEIVE
+#if defined(USE_BPF_SEND) || defined(USE_BPF_RECEIVE) || defined(USE_BPF_HWADDR)
+#include <net/if_types.h>
#include <ifaddrs.h>
#endif
interface_dereference (&fbi, MDL);
}
}
+#endif
+#if defined(USE_BPF_RECEIVE) || defined(USE_BPF_HWADDR)
void
get_hw_addr(const char *name, struct hardware *hw) {
struct ifaddrs *ifa;
#include "dhcpd.h"
#if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
-#include <sys/ioctl.h>
#include <sys/uio.h>
#include <errno.h>
#include "includes/netinet/ip.h"
#include "includes/netinet/udp.h"
#include "includes/netinet/if_ether.h"
+#endif
+
+#if defined (USE_LPF_RECEIVE) || defined (USE_LPF_HWADDR)
+#include <sys/ioctl.h>
#include <net/if.h>
+#endif
+#if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
/* Reinitializes the specified interface after an address change. This
is not required for packet-filter APIs. */
interface_dereference (&fbi, MDL);
}
}
+#endif
+#if defined (USE_LPF_RECEIVE) || defined (USE_LPF_HWADDR)
void
get_hw_addr(const char *name, struct hardware *hw) {
int sock;
# define USE_SOCKET_RECEIVE
# if defined(HAVE_DLPI)
# define USE_DLPI_HWADDR
+# elif defined(HAVE_LPF)
+# define USE_LPF_HWADDR
+# elif defined(HAVE_BPF)
+# define USE_BPF_HWADDR
# endif
#endif
* to be reopened after chdir() has been called
*/
if (path_dhcpd_db[0] != '/') {
- char *path = dmalloc(PATH_MAX, MDL);
- if (path == NULL)
- log_fatal("No memory for filename\n");
- path_dhcpd_db = realpath(path_dhcpd_db, path);
+ const char *path = path_dhcpd_db;
+ path_dhcpd_db = realpath(path_dhcpd_db, NULL);
if (path_dhcpd_db == NULL)
- log_fatal("%s: %s", path, strerror(errno));
+ log_fatal("Failed to get realpath for %s: %s", path,
+ strerror(errno));
}
if (!quiet) {