diff options
author | Shawn Routhier <sar@isc.org> | 2012-06-08 23:28:11 +0000 |
---|---|---|
committer | Shawn Routhier <sar@isc.org> | 2012-06-08 23:28:11 +0000 |
commit | 32e651c41804c06f764fd53540384f1e4fcd7309 (patch) | |
tree | 480c0ef0d285239774ff92da88db8a2dd602c021 /common/bpf.c | |
parent | 6980ae03c3b877d07557479b93d2276ab49560ac (diff) | |
download | isc-dhcp-32e651c41804c06f764fd53540384f1e4fcd7309.tar.gz |
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]
Diffstat (limited to 'common/bpf.c')
-rw-r--r-- | common/bpf.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/common/bpf.c b/common/bpf.c index b0ef6579..39c5abfd 100644 --- a/common/bpf.c +++ b/common/bpf.c @@ -3,7 +3,8 @@ 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 @@ -43,7 +44,6 @@ # 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 @@ -55,7 +55,8 @@ #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 @@ -550,7 +551,9 @@ void maybe_setup_fallback () 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; |