Patchlevel 14
This commit is contained in:
parent
10d94b3a1c
commit
4c4fb0b6fd
@ -42,7 +42,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: dispatch.c,v 1.1.1.7 1999/02/18 21:48:49 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: dispatch.c,v 1.1.1.8 1999/02/19 21:58:14 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -140,7 +140,7 @@ void discover_interfaces (state)
|
||||
except don't skip down interfaces if we're trying to
|
||||
get a list of configurable interfaces. */
|
||||
if ((ifr.ifr_flags & IFF_LOOPBACK) ||
|
||||
#ifdef IFF_POINTOPOINT
|
||||
#ifdef HAVE_IFF_POINTOPOINT
|
||||
(ifr.ifr_flags & IFF_POINTOPOINT) ||
|
||||
#endif
|
||||
(!(ifr.ifr_flags & IFF_UP) &&
|
||||
@ -168,7 +168,7 @@ void discover_interfaces (state)
|
||||
|
||||
/* If we have the capability, extract link information
|
||||
and record it in a linked list. */
|
||||
#ifdef AF_LINK
|
||||
#ifdef HAVE_AF_LINK
|
||||
if (ifp -> ifr_addr.sa_family == AF_LINK) {
|
||||
struct sockaddr_dl *foo = ((struct sockaddr_dl *)
|
||||
(&ifp -> ifr_addr));
|
||||
@ -328,7 +328,7 @@ void discover_interfaces (state)
|
||||
|
||||
/* Now cycle through all the interfaces we found, looking for
|
||||
hardware addresses. */
|
||||
#if defined (SIOCGIFHWADDR) && !defined (AF_LINK)
|
||||
#if defined (HAVE_SIOCGIFHWADDR) && !defined (HAVE_AF_LINK)
|
||||
for (tmp = interfaces; tmp; tmp = tmp -> next) {
|
||||
struct ifreq ifr;
|
||||
struct sockaddr sa;
|
||||
@ -352,7 +352,11 @@ void discover_interfaces (state)
|
||||
sa = *(struct sockaddr *)&ifr.ifr_hwaddr;
|
||||
|
||||
switch (sa.sa_family) {
|
||||
#ifdef ARPHRD_LOOPBACK
|
||||
#ifdef HAVE_ARPHRD_TUNNEL
|
||||
case ARPHRD_TUNNEL:
|
||||
/* ignore tunnel interfaces. */
|
||||
#endif
|
||||
#ifdef HAVE_ARPHRD_LOOPBACK
|
||||
case ARPHRD_LOOPBACK:
|
||||
/* ignore loopback interface */
|
||||
break;
|
||||
@ -382,7 +386,7 @@ void discover_interfaces (state)
|
||||
memcpy (tmp -> hw_address.haddr, sa.sa_data, 16);
|
||||
break;
|
||||
|
||||
#ifdef ARPHRD_METRICOM
|
||||
#ifdef HAVE_ARPHRD_METRICOM
|
||||
case ARPHRD_METRICOM:
|
||||
tmp -> hw_address.hlen = 6;
|
||||
tmp -> hw_address.htype = ARPHRD_METRICOM;
|
||||
@ -395,7 +399,7 @@ void discover_interfaces (state)
|
||||
ifr.ifr_name, sa.sa_family);
|
||||
}
|
||||
}
|
||||
#endif /* defined (SIOCGIFHWADDR) && !defined (AF_LINK) */
|
||||
#endif /* defined (HAVE_SIOCGIFHWADDR) && !defined (HAVE_AF_LINK) */
|
||||
|
||||
/* If we're just trying to get a list of interfaces that we might
|
||||
be able to configure, we can quit now. */
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: socket.c,v 1.1.1.5 1999/02/18 21:48:51 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: socket.c,v 1.1.1.6 1999/02/19 21:58:15 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -102,7 +102,7 @@ int if_register_socket (info)
|
||||
int sock;
|
||||
int flag;
|
||||
|
||||
#if !defined (SO_BINDTODEVICE) && !defined (USE_FALLBACK)
|
||||
#if !defined (HAVE_SO_BINDTODEVICE) && !defined (USE_FALLBACK)
|
||||
/* Make sure only one interface is registered. */
|
||||
if (once)
|
||||
error ("The standard socket API can only support %s",
|
||||
@ -136,7 +136,7 @@ int if_register_socket (info)
|
||||
if (bind (sock, (struct sockaddr *)&name, sizeof name) < 0)
|
||||
error ("Can't bind to dhcp address: %m");
|
||||
|
||||
#if defined (SO_BINDTODEVICE)
|
||||
#if defined (HAVE_SO_BINDTODEVICE)
|
||||
/* Bind this socket to this interface. */
|
||||
if (info -> ifp &&
|
||||
setsockopt (sock, SOL_SOCKET, SO_BINDTODEVICE,
|
||||
|
@ -111,6 +111,12 @@ extern int h_errno;
|
||||
# define USE_LPF
|
||||
# define LINUX_SLASHPROC_DISCOVERY
|
||||
# define PROCDEV_DEVICE "/proc/net/dev"
|
||||
# define HAVE_ARPHRD_TUNNEL
|
||||
# define HAVE_ARPHRD_METRICOM
|
||||
# define HAVE_ARPHRD_IEEE802
|
||||
# define HAVE_ARPHRD_LOOPBACK
|
||||
# define HAVE_SO_BINDTODEVICE
|
||||
# define HAVE_SIOCGIFHWADDR
|
||||
# else
|
||||
# define USE_SOCKETS
|
||||
# define IGNORE_HOSTUNREACH
|
||||
|
@ -230,3 +230,36 @@
|
||||
#ifndef BPF_FORMAT
|
||||
# define BPF_FORMAT "/dev/bpf%d"
|
||||
#endif
|
||||
|
||||
#if defined (IFF_POINTOPOINT) && !defined (HAVE_IFF_POINTOPOINT)
|
||||
# define HAVE_IFF_POINTOPOINT
|
||||
#endif
|
||||
|
||||
#if defined (AF_LINK) && !defined (HAVE_AF_LINK)
|
||||
# define HAVE_AF_LINK
|
||||
#endif
|
||||
|
||||
#if defined (ARPHRD_TUNNEL) && !defined (HAVE_ARPHRD_TUNNEL)
|
||||
# define HAVE_ARPHRD_TUNNEL
|
||||
#endif
|
||||
|
||||
#if defined (ARPHRD_LOOPBACK) && !defined (HAVE_ARPHRD_LOOPBACK)
|
||||
# define HAVE_ARPHRD_LOOPBACK
|
||||
#endif
|
||||
|
||||
#if defined (ARPHRD_METRICOM) && !defined (HAVE_ARPHRD_METRICOM)
|
||||
# define HAVE_ARPHRD_METRICOM
|
||||
#endif
|
||||
|
||||
#if defined (SO_BINDTODEVICE) && !defined (HAVE_SO_BINDTODEVICE)
|
||||
# define HAVE_SO_BINDTODEVICE
|
||||
#endif
|
||||
|
||||
#if defined (SIOCGIFHWADDR) && !defined (HAVE_SIOCGIFHWADDR)
|
||||
# define HAVE_SIOCGIFHWADDR
|
||||
#endif
|
||||
|
||||
#if defined (AF_LINK) && !defined (HAVE_AF_LINK)
|
||||
# define HAVE_AF_LINK
|
||||
#endif
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char ocopyright [] =
|
||||
"$Id: dhcrelay.c,v 1.1.1.5 1999/02/18 21:48:54 mellon Exp $ Copyright (c) 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: dhcrelay.c,v 1.1.1.6 1999/02/19 21:58:17 mellon Exp $ Copyright (c) 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -76,7 +76,7 @@ struct server_list {
|
||||
static char copyright [] =
|
||||
"Copyright 1997, 1998, 1999 The Internet Software Consortium.";
|
||||
static char arr [] = "All rights reserved.";
|
||||
static char message [] = "Internet Software Consortium DHCP Relay Agent V2.0b1pl13";
|
||||
static char message [] = "Internet Software Consortium DHCP Relay Agent V2.0b1pl14";
|
||||
static char contrib [] = "\nPlease contribute if you find this software useful.";
|
||||
static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.html\n";
|
||||
|
||||
@ -341,7 +341,8 @@ void relay (ip, packet, length, from_port, from, hfrom)
|
||||
|
||||
static void usage ()
|
||||
{
|
||||
error ("Usage: dhcrelay [-c] [-p <port>] [server1 [... serverN]]");
|
||||
warn ("Usage: dhcrelay [-i] [-d] [-i if0] [...-i ifN] [-p <port>]");
|
||||
error (" [server1 [... serverN]]");
|
||||
}
|
||||
|
||||
void cleanup ()
|
||||
|
Loading…
Reference in New Issue
Block a user