- Fixed failover reconnection retry code to continue to retry to reconnect
rather than restarting the listener.
+- Compilation on Solaris with USE_SOCKETS defined in includes/site.h has
+ been repaired. Other USE_ overrides should work better.
+
+- A check for the local flavor of IFNAMSIZ had a broken 'else' condition,
+ that probably still resulted in the correct behaviour (but wouldn't use
+ a larger defined value provided by the host OS).
+
Changes since 4.1.0b1
- A missing "else" in dhcrelay.c could have caused an interface not to
#ifndef IF_NAMESIZE
# if defined(LIFNAMSIZ)
# define IF_NAMESIZE LIFNAMSIZ
-# elseif defined(IFNAMSIZ)
+# elif defined(IFNAMSIZ)
# define IF_NAMESIZE IFNAMSIZ
# else
# define IF_NAMESIZE 16
#include "dhcpd.h"
-#if defined (USE_DLPI_SEND) || defined (USE_DLPI_RECEIVE)
+#if defined (USE_DLPI_SEND) || defined (USE_DLPI_RECEIVE) || \
+ defined(USE_DLPI_HWADDR)
# include <sys/ioctl.h>
# include <sys/time.h>
static int dlpiinfoack PROTO ((int fd, char *bufp));
static int dlpiphysaddrack PROTO ((int fd, char *bufp));
static int dlpibindack PROTO ((int fd, char *bufp));
+#if defined(USE_DLPI_SEND) || defined(USE_DLPI_RECEIVE)
+/* These functions are not used if we're only sourcing the get_hw_addr()
+ * function (for USE_SOCKETS).
+ */
static int dlpiunitdatareq PROTO ((int fd, unsigned char *addr,
int addrlen, unsigned long minpri,
unsigned long maxpri, unsigned char *data,
unsigned long *grpaddr,
unsigned char *data,
int datalen));
-
+#endif /* !USE_DLPI_HWADDR: USE_DLPI_SEND || USE_DLPI_RECEIVE */
static int expected PROTO ((unsigned long prim, union DL_primitives *dlp,
int msgflags));
static int strgetmsg PROTO ((int fd, struct strbuf *ctlp,
return 0;
}
+#if defined(USE_DLPI_SEND) || defined(USE_DLPI_RECEIVE)
int dlpiunitdatareq (fd, addr, addrlen, minpri, maxpri, dbuf, dbuflen)
int fd;
unsigned char *addr;
return data.len;
}
+#endif /* !USE_DLPI_HWADDR: USE_DLPI_RECEIVE || USE_DLPI_SEND */
/*
* expected - see if we got what we wanted.
return 0;
}
+#if defined(USE_DLPI_SEND)
int can_unicast_without_arp (ip)
struct interface_info *ip;
{
interface_dereference (&fbi, MDL);
}
}
+#endif /* USE_DLPI_SEND */
void
get_hw_addr(const char *name, struct hardware *hw) {
close(sock);
}
-#endif /* USE_DLPI */
+#endif /* USE_DLPI_SEND || USE_DLPI_RECEIVE || USE_DLPI_HWADDR */
])
if test -n "$DO_LPF"
then
- AC_DEFINE([USE_LPF], [1],
+ AC_DEFINE([HAVE_LPF], [1],
[Define to 1 to use the Linux Packet Filter interface code.])
else
AC_CHECK_HEADER(sys/dlpi.h, DO_DLPI=1)
if test -n "$DO_DLPI"
then
- AC_DEFINE([USE_DLPI], [1],
+ AC_DEFINE([HAVE_DLPI], [1],
[Define to 1 to use DLPI interface code.])
else
AC_CHECK_HEADER(net/bpf.h, DO_BPF=1)
if test -n "$DO_BPF"
then
- AC_DEFINE([USE_BPF], [""],
+ AC_DEFINE([HAVE_BPF], [""],
[Define to 1 to use the
Berkeley Packet Filter interface code.])
fi
fi
-
fi
# SIOCGLIFCONF uses some transport structures. Trick is not all platforms
/* Only used by DHCP client code. */
struct client_state *client;
-# if defined (USE_DLPI_SEND) || defined (USE_DLPI_RECEIVE)
+# if defined(USE_DLPI_SEND) || defined(USE_DLPI_RECEIVE) || \
+ defined(USE_DLPI_HWADDR)
int dlpi_sap_length;
struct hardware dlpi_broadcast_addr;
# endif /* DLPI_SEND || DLPI_RECEIVE */
!defined (USE_NIT_RECEIVE) && \
!defined (USE_DLPI_SEND) && \
!defined (USE_DLPI_RECEIVE)
-# define USE_DEFAULT_NETWORK
+/* Determine default socket API to USE. */
+# if defined(HAVE_BPF)
+# define USE_BPF 1
+# elif defined(HAVE_LPF)
+# define USE_LPF 1
+# elif defined(HAVE_DLPI)
+# define USE_DLPI 1
+# endif
#endif
#if !defined (TIME_MAX)
#ifdef USE_SOCKETS
# define USE_SOCKET_SEND
# define USE_SOCKET_RECEIVE
+# if defined(HAVE_DLPI)
+# define USE_DLPI_HWADDR
+# endif
#endif
#ifdef USE_RAW_SOCKETS
you don't choose, one will be chosen for you in your system's config
header. DON'T MESS WITH THIS UNLESS YOU KNOW WHAT YOU'RE DOING!!! */
-/* Define this to use the standard BSD socket API.
+/* Define USE_SOCKETS to use the standard BSD socket API.
On many systems, the BSD socket API does not provide the ability to
send packets to the 255.255.255.255 broadcast address, which can