2.0 Beta 1 Patchlevel 18
This commit is contained in:
parent
5ebd489607
commit
9c2d0f125c
@ -391,14 +391,17 @@ void if_register_receive (info)
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + 6;
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT + ENF_CAND;
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = htons (ETHERTYPE_IP);
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT;
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = htons (IPPROTO_UDP);
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + 11;
|
||||
#if defined(i386) || defined(__i386)
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHFF00 + ENF_AND;
|
||||
#else
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSH00FF + ENF_AND;
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_CAND;
|
||||
#endif
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT + ENF_CAND;
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = htons (IPPROTO_UDP);
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + 18;
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT + ENF_CAND;
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = htons (local_port);
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = local_port;
|
||||
#else
|
||||
/*
|
||||
* The packets that will be received on this file descriptor
|
||||
@ -409,14 +412,17 @@ void if_register_receive (info)
|
||||
* to the local port. All offsets are relative to the start
|
||||
* of an IP packet.
|
||||
*/
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT;
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = htons (IPPROTO_UDP);
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + 4;
|
||||
#if defined(i386) || defined(__i386)
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHFF00 + ENF_AND;
|
||||
#else
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSH00FF + ENF_AND;
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_CAND;
|
||||
#endif
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT + ENF_CAND;
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = htons (IPPROTO_UDP);
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + 11;
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT + ENF_CAND;
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = htons (local_port);
|
||||
pf.Pf_Filter [pf.Pf_FilterLen++] = local_port;
|
||||
#endif
|
||||
|
||||
/* Install the filter... */
|
||||
|
@ -111,28 +111,27 @@ extern int h_errno;
|
||||
#define TIME time_t
|
||||
#define GET_TIME(x) time ((x))
|
||||
|
||||
#if defined (USE_DEFAULT_NETWORK)
|
||||
# if (LINUX_MAJOR >= 2) && (LINUX_MINOR >= 1)
|
||||
# define USE_LPF
|
||||
#if (LINUX_MAJOR >= 2)
|
||||
# if (LINUX_MINOR >= 1)
|
||||
# if defined (USE_DEFAULT_NETWORK)
|
||||
# define USE_LPF
|
||||
# endif
|
||||
# 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
|
||||
# if (LINUX_MAJOR == 2)
|
||||
# define HAVE_ARPHRD_METRICOM
|
||||
# define HAVE_ARPHRD_IEEE802
|
||||
# define HAVE_ARPHRD_LOOPBACK
|
||||
# define HAVE_SO_BINDTODEVICE
|
||||
# define HAVE_SIOCGIFHWADDR
|
||||
# endif
|
||||
# define USE_SOCKETS
|
||||
# define IGNORE_HOSTUNREACH
|
||||
# endif
|
||||
# define HAVE_ARPHRD_METRICOM
|
||||
# define HAVE_ARPHRD_IEEE802
|
||||
# define HAVE_ARPHRD_LOOPBACK
|
||||
# define HAVE_SO_BINDTODEVICE
|
||||
# define HAVE_SIOCGIFHWADDR
|
||||
#endif
|
||||
|
||||
#if !defined (USE_LPF)
|
||||
# if defined (USE_DEFAULT_NETWORK)
|
||||
# define USE_SOCKETS
|
||||
# endif
|
||||
# define IGNORE_HOSTUNREACH
|
||||
#endif
|
||||
|
||||
#define ALIAS_NAMES_PERMUTED
|
||||
|
@ -3,7 +3,7 @@
|
||||
Operating system dependencies... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 1997, 1998 The Internet Software Consortium.
|
||||
* Copyright (c) 1996, 1997, 1998, 1999 The Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char ocopyright [] =
|
||||
"$Id: dhcrelay.c,v 1.1.1.7 1999/02/24 04:11:06 mellon Exp $ Copyright (c) 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: dhcrelay.c,v 1.1.1.8 1999/03/05 17:43:46 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.0b1pl15";
|
||||
static char message [] = "Internet Software Consortium DHCP Relay Agent V2.0b1pl18";
|
||||
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";
|
||||
|
||||
@ -273,10 +273,11 @@ void relay (ip, packet, length, from_port, from, hfrom)
|
||||
to.sin_len = sizeof to;
|
||||
#endif
|
||||
|
||||
memcpy (hto.haddr, packet -> chaddr,
|
||||
(packet -> hlen > sizeof hto.haddr
|
||||
? sizeof hto.haddr
|
||||
: packet -> hlen));
|
||||
/* Set up the hardware destination address. */
|
||||
hto.hlen = packet -> hlen;
|
||||
if (hto.hlen > sizeof hto.haddr)
|
||||
hto.hlen = sizeof hto.haddr;
|
||||
memcpy (hto.haddr, packet -> chaddr, hto.hlen);
|
||||
hto.htype = packet -> htype;
|
||||
|
||||
/* Find the interface that corresponds to the giaddr
|
||||
|
Loading…
x
Reference in New Issue
Block a user