merge dhcp-3.0.1rc11

This commit is contained in:
drochner 2003-02-18 17:08:38 +00:00
parent d9a7d0e611
commit b6ae80da0f
65 changed files with 903 additions and 732 deletions

View File

@ -1,6 +1,6 @@
# Makefile.conf
#
# Copyright (c) 1996-2000 Internet Software Consortium.
# Copyright (c) 1996-2002 Internet Software Consortium.
# Use is subject to license terms which appear in the file named
# ISC-LICENSE that should have accompanied this file when you
# received it. If a file named ISC-LICENSE did not accompany this

16
dist/dhcp/README vendored
View File

@ -97,7 +97,7 @@ system.
RELEASE STATUS
This is the ninth release candidate of version 3.0.1 of the ISC DHCP
This is the tenth release candidate of version 3.0.1 of the ISC DHCP
Distribution. Development of this release is approaching the point at
which it will be frozen, and no significant new features will be
added.
@ -143,14 +143,14 @@ information. On Digital Unix, type ``man pfilt''.
To build the DHCP Distribution, unpack the compressed tar file using
the tar utility and the gzip command - type something like:
zcat dhcp-3.0.1rc9.tar.gz |tar xvf -
zcat dhcp-3.0.1rc11.tar.gz |tar xvf -
On BSD/OS, you have to type gzcat, not zcat, and you may run into
similar problems on other operating systems.
CONFIGURING IT
Now, cd to the dhcp-3.0.1rc9 subdirectory that you've just
Now, cd to the dhcp-3.0.1rc11 subdirectory that you've just
created and configure the source tree by typing:
./configure
@ -244,16 +244,6 @@ network interface. There are also two potential compilation/runtime
problems for Linux 2.1/2.2: the "SO_ATTACH_FILTER undeclared" problem
and the "protocol not configured" problem.
LINUX: IF_TR.H NOT FOUND
When you compile the distribution on Linux, you may get an error
message indicating that the include file if_tr.h could not be found.
If this happens, go into includes/cf/linux.h and delete the line that
defined HAVE_TR_SUPPORT, or look into installing a new version of libc
that includes the if_tr.h file. We will be working on removing this
problem in the future, but for now, if you run into it, this should be
a viable workaround.
LINUX: SO_ATTACH_FILTER UNDECLARED
In addition, there is a minor issue that we will mention here because

70
dist/dhcp/RELNOTES vendored
View File

@ -1,7 +1,7 @@
Internet Software Consortium DHCP Distribution
Version 3.0.1
Release Candidate 9
April 30, 2002
Release Candidate 10
June, 2002
Release Notes
@ -46,6 +46,72 @@ Murrell at BC Tel Advanced Communications. I'd like to express my
thanks to all of these good people here, both for working on the code
and for prodding me into improving it.
Changes since 3.0.1rc10
- Potential buffer overflows in minires repaired.
- A change to the linux client script to use /bin/bash, since /bin/sh may
not be bash.
- Some missing va_end cleanups thanks to a patch from Thomas Klausner.
- A correction of boolean parsing syntax validation - some illegal syntaxes
that worked before are now detected and produce errs, some legal syntaxes
that errored before will now work properly.
- Some search-and-replace errors that caused some options to change their
names was repaired.
- Shu-min Chang of the Intel corporation has contributed a perl script and
module that converts the MS NT4 DHCP configuration to a ISC DHCP3
configuration file.
- Applied the remainder of the dhcpctl memory leak patch provided by Bill
Squier at ReefEdge, Inc. (groo@reefedge.com).
- Missing non-optional failover peer configurations will now result in a soft
error rather than a null dereference.
Changes since 3.0.1rc9
- A format string was corrected to fix compiler warnings.
- A number of spelling corrections were made in the man pages.
- The dhclient.conf.5 man page was changed to refer to do-forward-updates
rather than a configuration option that doesn't exist.
- A FreeBSD-specific bug in the interface removal handling was fixed.
- A Linux-specific Token Ring detection problem was fixed.
- Hashes removed from as-yet-unknown agent options, having those options
appear in reality before we know about them will no longer produce
self-corrupting lease databases.
- dhclient will use the proper port numbers now when using the -g option.
- A order-of-operations bug with 2 match clauses in 1 class statement is
fixed thanks to a patch from Andrew Matheson.
- Compilation problems on Solaris were fixed.
- Compilation problems when built with DEBUG or DEBUG_PACKET were repaired.
- A fix to the dhcp ack process which makes certain group options will be
included in the first DHCPOFFER message was made thanks to a patch from
Ling Gou.
- A few memory leaks were repaired thanks to patches from Bill Squier at
ReefEdge, Inc. (groo@reefedge.com).
- A fix for shared-networks that sometimes give clients options for the
wrong subnets (in particular, 'option routers') was applied, thanks to
Ted Lemon for the patch.
- Omshell's handling of dotted octets as values was changed such that dots
one after the other produce zero values in the integer string.
Changes since 3.0.1rc8
- Fix a format string vulnerability in the server that could lead to a

View File

@ -1,6 +1,6 @@
.\" dhclient-script.8
.\"
.\" Copyright (c) 1996-2001 Internet Software Consortium.
.\" Copyright (c) 1996-2002 Internet Software Consortium.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
@ -34,6 +34,9 @@
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
.\" $Id: dhclient-script.8,v 1.4 2003/02/18 17:08:39 drochner Exp $
.\"
.TH dhclient-script 8
.SH NAME
dhclient-script - DHCP client network configuration script

View File

@ -1,6 +1,6 @@
.\" dhclient.8
.\"
.\" Copyright (c) 1996-1999 Internet Software Consortium.
.\" Copyright (c) 1996-2002 Internet Software Consortium.
.\" Use is subject to license terms which appear in the file named
.\" ISC-LICENSE that should have accompanied this file when you
.\" received it. If a file named ISC-LICENSE did not accompany this
@ -15,6 +15,9 @@
.\"
.\" Support and other services are available for ISC products - see
.\" http://www.isc.org for more information.
.\"
.\" $Id: dhclient.8,v 1.5 2003/02/18 17:08:39 drochner Exp $
.\"
.TH dhclient 8
.SH NAME
dhclient - Dynamic Host Configuration Protocol (DHCP) Client
@ -140,7 +143,7 @@ than cycling through the list of old leases.
The names of the network interfaces that dhclient should attempt to
configure may be specified on the command line. If no interface names
are specified on the command line dhclient will normally identify all
network interfaces, elimininating non-broadcast interfaces if
network interfaces, eliminating non-broadcast interfaces if
possible, and attempt to configure each interface.
.PP
It is also possible to specify interfaces by name in the

View File

@ -41,7 +41,7 @@
#ifndef lint
static char ocopyright[] =
"$Id: dhclient.c,v 1.7 2002/06/11 14:27:21 drochner Exp $ Copyright (c) 1995-2001 Internet Software Consortium. All rights reserved.\n";
"$Id: dhclient.c,v 1.8 2003/02/18 17:08:39 drochner Exp $ Copyright (c) 1995-2002 Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -71,19 +71,19 @@ struct in_addr giaddr;
assert (state_is == state_shouldbe). */
#define ASSERT_STATE(state_is, state_shouldbe) {}
static char copyright[] = "Copyright 1995-2001 Internet Software Consortium.";
static char copyright[] = "Copyright 1995-2002 Internet Software Consortium.";
static char arr [] = "All rights reserved.";
static char message [] = "Internet Software Consortium DHCP Client";
static char url [] = "For info, please visit http://www.isc.org/products/DHCP";
u_int16_t local_port;
u_int16_t remote_port;
int no_daemon;
struct string_list *client_env;
int client_env_count;
int onetry;
int quiet;
int nowait;
u_int16_t local_port=0;
u_int16_t remote_port=0;
int no_daemon=0;
struct string_list *client_env=NULL;
int client_env_count=0;
int onetry=0;
int quiet=0;
int nowait=0;
static void usage PROTO ((void));
@ -289,8 +289,10 @@ int main (argc, argv, envp)
/* Default to the DHCP/BOOTP port. */
if (!local_port) {
/* If we're faking a relay agent, and we're not using loopback,
use the server port, not the client port. */
if (relay && giaddr.s_addr != htonl (INADDR_LOOPBACK)) {
local_port = htons (67);
local_port = htons(67);
} else {
ent = getservbyname ("dhcpc", "udp");
if (!ent)
@ -304,13 +306,12 @@ int main (argc, argv, envp)
}
/* If we're faking a relay agent, and we're not using loopback,
use the server port, not the client port. */
we're using the server port, not the client port. */
if (relay && giaddr.s_addr != htonl (INADDR_LOOPBACK)) {
local_port = htons (ntohs (local_port) - 1);
remote_port = local_port;
} else
remote_port = htons (ntohs (local_port) - 1); /* XXX */
/* Get the current time... */
GET_TIME (&cur_time);

View File

@ -1,6 +1,6 @@
.\" dhclient.conf.5
.\"
.\" Copyright (c) 1996-2001 Internet Software Consortium.
.\" Copyright (c) 1996-2002 Internet Software Consortium.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
@ -34,6 +34,9 @@
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
.\" $Id: dhclient.conf.5,v 1.4 2003/02/18 17:08:39 drochner Exp $
.\"
.TH dhclient.conf 5
.SH NAME
dhclient.conf - DHCP client configuration file
@ -249,19 +252,19 @@ updated. The \fIfqdn.encoded\fR option may need to be set to
\fIon\fR or \fIoff\fR, depending on the DHCP server you are using.
.PP
.I The
.B no-client-updates
.B do-forward-updates
.I statement
.PP
\fBno-client-updates [ \fIflag\fR ] \fB;\fR
\fBdo-forward-updates [ \fIflag\fR ] \fB;\fR
.PP
If you want to do DNS updates in the DHCP client
script (see \fBdhclient-script(8)\fR) rather than having the
DHCP client do the update directly (for example, if you want to
use SIG(0) authentication, which is not supported directly by the
DHCP client, you can instruct the client not to do the update using
the \fBno-client-updates\fR statement. \fIFlag\fR should be \fBtrue\fR
if you don't want the DHCP client to do the update, and \fBfalse\fR if
you want the DHCP client to do the update. By default, the DHCP
the \fBdo-forward-updates\fR statement. \fIFlag\fR should be \fBtrue\fR
if you want the DHCP client to do the update, and \fBfalse\fR if
you don't want the DHCP client to do the update. By default, the DHCP
client will do the DNS update.
.SH OPTION MODIFIERS
In some cases, a client may receive option data from the server which

View File

@ -1,6 +1,6 @@
.\" dhclient.conf.5
.\"
.\" Copyright (c) 1997 The Internet Software Consortium.
.\" Copyright (c) 1997-2002 The Internet Software Consortium.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@ -35,6 +35,9 @@
.\" Enterprises. To learn more about the Internet Software Consortium,
.\" see ``http://www.isc.org/isc''. To learn more about Vixie
.\" Enterprises, see ``http://www.vix.com''.
.\"
.\" $Id: dhclient.leases.5,v 1.4 2003/02/18 17:08:40 drochner Exp $
.\"
.TH dhclient.leases 5
.SH NAME
dhclient.leases - DHCP client lease database

View File

@ -1,5 +1,7 @@
#!/bin/sh
#
# $Id: freebsd,v 1.3 2003/02/18 17:08:40 drochner Exp $
#
# $FreeBSD$
if [ -x /usr/bin/logger ]; then
@ -9,8 +11,12 @@ else
fi
make_resolv_conf() {
if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
echo search $new_domain_name >/etc/resolv.conf
if [ x"$new_domain_name_servers" != x ]; then
if [ "x$new_domain_name" != x ]; then
echo search $new_domain_name >/etc/resolv.conf
else
rm /etc/resolv.conf
fi
for nameserver in $new_domain_name_servers; do
echo nameserver $nameserver >>/etc/resolv.conf
done

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# dhclient-script for Linux. Dan Halbert, March, 1997.
# Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
# No guarantees about this. I'm a novice at the details of Linux

View File

@ -3,7 +3,7 @@
Memory allocation... */
/*
* Copyright (c) 1996-2001 Internet Software Consortium.
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: alloc.c,v 1.3 2002/06/11 14:00:01 drochner Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
"$Id: alloc.c,v 1.4 2003/02/18 17:08:40 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,7 +3,7 @@
BPF socket interface code, originally contributed by Archie Cobbs. */
/*
* Copyright (c) 1996-2000 Internet Software Consortium.
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -47,7 +47,7 @@
#ifndef lint
static char copyright[] =
"$Id: bpf.c,v 1.5 2002/06/11 14:00:01 drochner Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
"$Id: bpf.c,v 1.6 2003/02/18 17:08:40 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -425,7 +425,11 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
interface -> rbuf,
(size_t)interface -> rbuf_max);
if (length <= 0) {
#ifdef __FreeBSD__
if (errno == ENXIO) {
#else
if (errno == EIO) {
#endif
dhcp_interface_remove
((omapi_object_t *)interface,
(omapi_object_t *)0);

View File

@ -3,7 +3,7 @@
OMAPI object interfaces for the DHCP server. */
/*
* Copyright (c) 1999-2001 Internet Software Consortium.
* Copyright (c) 1999-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -50,7 +50,7 @@
#ifndef lint
static char copyright[] =
"$Id: comapi.c,v 1.4 2002/06/11 14:00:01 drochner Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: comapi.c,v 1.5 2003/02/18 17:08:40 drochner Exp $ Copyright (c) 1999-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -1,6 +1,6 @@
.\" dhcp-eval.5
.\"
.\" Copyright (c) 1996-2001 Internet Software Consortium.
.\" Copyright (c) 1996-2002 Internet Software Consortium.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:

View File

@ -1,6 +1,6 @@
.\" dhcp-options.5
.\"
.\" Copyright (c) 1996-2001 Internet Software Consortium.
.\" Copyright (c) 1996-2002 Internet Software Consortium.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
@ -34,6 +34,9 @@
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
.\" $Id: dhcp-options.5,v 1.5 2003/02/18 17:08:40 drochner Exp $
.\"
.TH dhcpd-options 5
.SH NAME
dhcp-options - Dynamic Host Configuration Protocol options
@ -244,7 +247,7 @@ server reply (DHCPOFFER), a DHCP server uses this option to specify
the lease time it is willing to offer.
.PP
This option is not directly user configurable in the server; refer to the
\fImax-lease-time\fR and \fidefault-lease-time\fR server options in
\fImax-lease-time\fR and \fIdefault-lease-time\fR server options in
.B dhcpd.conf(5).
.RE
.PP
@ -513,7 +516,7 @@ respond.
.RS 0.25i
.PP
This option specifies the maximum size datagram that the client
should be prepared to reassemble. The minimum value legal value is
should be prepared to reassemble. The minimum legal value is
576.
.RE
.PP
@ -551,7 +554,7 @@ The nds-servers option specifies a list of IP addresses of NDS servers.
.B option \fBnds-tree-name\fR \fIstring\fR\fB;\fR
.RS 0.25i
.PP
The nds-context option specifies NDS tree name that the NDS client
The nds-tree-name option specifies NDS tree name that the NDS client
should use.
.RE
.PP
@ -651,7 +654,7 @@ client. Servers should be listed in order of preference.
This option specifies whether the client should configure its IP
layer to allow forwarding of datagrams with non-local source routes
(see Section 3.3.5 of [4] for a discussion of this topic). A value
of 0 means disallow forwarding of such datagrams, and a value of true
of false means disallow forwarding of such datagrams, and a value of true
means allow forwarding.
.RE
.PP
@ -945,7 +948,7 @@ preference.
.PP
This option specifies whether or not the client should negotiate the
use of trailers (RFC 893 [14]) when using the ARP protocol. A value
of 0 indicates that the client should not attempt to use trailers. A
of false indicates that the client should not attempt to use trailers. A
value of true means that the client should attempt to use trailers.
.RE
.PP
@ -1114,7 +1117,7 @@ the format in which the \fIfqdn.fqdn\fR suboption is encoded.
.PP
.B option fqdn.rcode1 \fIflag\fB;
.PP
.B option fqdn.rcode1 \fIflag\fB;
.B option fqdn.rcode2 \fIflag\fB;
.RS 0.25i
.PP
These options specify the result of the updates of the A and PTR records,

View File

@ -3,7 +3,7 @@
Network input dispatcher... */
/*
* Copyright (c) 1995-2001 Internet Software Consortium.
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: discover.c,v 1.4 2002/06/11 14:00:01 drochner Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: discover.c,v 1.5 2003/02/18 17:08:40 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -558,8 +558,12 @@ void discover_interfaces (state)
if (tmp -> next)
interface_reference (&next, tmp -> next, MDL);
/* skip interfaces that are running already */
if (tmp -> flags & INTERFACE_RUNNING)
if (tmp -> flags & INTERFACE_RUNNING) {
interface_dereference(&tmp, MDL);
if(next)
interface_reference(&tmp, next, MDL);
continue;
}
if ((tmp -> flags & INTERFACE_AUTOMATIC) &&
state == DISCOVER_REQUESTED)
tmp -> flags &= ~(INTERFACE_AUTOMATIC |

View File

@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: dispatch.c,v 1.1.1.2 2003/02/18 16:37:55 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: dispatch.c,v 1.2 2003/02/18 17:08:40 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -88,7 +88,7 @@
#ifndef lint
static char copyright[] =
"$Id: dlpi.c,v 1.1.1.2 2003/02/18 16:37:56 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: dlpi.c,v 1.2 2003/02/18 17:08:40 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,7 +3,7 @@
Domain Name Service subroutines. */
/*
* Copyright (c) 2001 Internet Software Consortium.
* Copyright (c) 2001-2002 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 copyright[] =
"$Id: dns.c,v 1.4 2002/06/11 14:00:01 drochner Exp $ Copyright (c) 2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: dns.c,v 1.5 2003/02/18 17:08:40 drochner Exp $ Copyright (c) 2001-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: ethernet.c,v 1.1.1.2 2003/02/18 16:37:56 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: ethernet.c,v 1.2 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,7 +3,7 @@
Support for executable statements. */
/*
* Copyright (c) 1998-2001 Internet Software Consortium.
* Copyright (c) 1998-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: execute.c,v 1.3 2002/06/11 14:00:01 drochner Exp $ Copyright (c) 1998-2000 The Internet Software Consortium. All rights reserved.\n";
"$Id: execute.c,v 1.4 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1998-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,7 +3,7 @@
Packet assembly code, originally contributed by Archie Cobbs. */
/*
* Copyright (c) 1996-2000 Internet Software Consortium.
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: fddi.c,v 1.3 2002/06/10 00:30:34 itojun Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
"$Id: fddi.c,v 1.4 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -57,7 +57,7 @@ static char copyright[] =
#if defined (NETBSD_FDDI)
#include <net/if_fddi.h>
#include <net/if_llc.h>
#define LLC_SNAP_LEN LLC_SNAPFRAMELEN
#define LLC_SNAP_LEN LLC_SNAPFRAMELEN
#endif /* NETBSD_FDDI */
#if defined (PACKET_ASSEMBLY) || defined (PACKET_DECODING)

View File

@ -4,7 +4,7 @@
responses. */
/*
* Copyright (c) 1996-2001 Internet Software Consortium.
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -44,7 +44,7 @@
#ifndef lint
static char copyright[] =
"$Id: icmp.c,v 1.4 2002/06/11 14:00:01 drochner Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: icmp.c,v 1.5 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -160,7 +160,7 @@ int icmp_echorequest (addr)
if (!icmp_state)
log_fatal ("ICMP protocol used before initialization.");
memset(&to, 0, sizeof(to));
memset (&to, 0, sizeof(to));
#ifdef HAVE_SA_LEN
to.sin_len = sizeof to;
#endif

View File

@ -4,7 +4,7 @@
way... */
/*
* Copyright (c) 1995-2001 Internet Software Consortium.
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -44,7 +44,7 @@
#ifndef lint
static char copyright[] =
"$Id: inet.c,v 1.2 2002/06/10 00:30:34 itojun Exp $ Copyright (c) 1995-1999 The Internet Software Consortium. All rights reserved.\n";
"$Id: inet.c,v 1.3 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -37,7 +37,7 @@
#ifndef lint
static char copyright[] =
"$Id: lpf.c,v 1.1.1.2 2003/02/18 16:37:56 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: lpf.c,v 1.2 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,7 +3,7 @@
Memory-resident database... */
/*
* Copyright (c) 1995-2001 Internet Software Consortium.
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: memory.c,v 1.3 2002/06/11 14:00:01 drochner Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
"$Id: memory.c,v 1.4 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -44,7 +44,7 @@
#ifndef lint
static char copyright[] =
"$Id: nit.c,v 1.1.1.2 2003/02/18 16:37:56 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: nit.c,v 1.2 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,7 +3,7 @@
Packet assembly code, originally contributed by Archie Cobbs. */
/*
* Copyright (c) 1996-2001 Internet Software Consortium.
* Copyright (c) 1996-2002 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 copyright[] =
"$Id: packet.c,v 1.2 2001/08/03 13:07:04 drochner Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: packet.c,v 1.3 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,7 +3,7 @@
Common parser code for dhcpd and dhclient. */
/*
* Copyright (c) 1995-2001 Internet Software Consortium.
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: parse.c,v 1.4 2002/06/11 14:00:02 drochner Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: parse.c,v 1.5 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -327,7 +327,7 @@ int parse_ip_addr (cfile, addr)
/*
* hardware-parameter :== HARDWARE hardware-type colon-seperated-hex-list SEMI
* hardware-type :== ETHERNET | TOKEN_RING
* hardware-type :== ETHERNET | TOKEN_RING | FDDI
*/
void parse_hardware_param (cfile, hardware)
@ -3965,83 +3965,51 @@ int parse_expression (expr, cfile, lose, context, plhs, binop)
case AND:
next_op = expr_and;
context = expression_context (rhs);
if (context != context_boolean) {
needbool:
parse_warn (cfile, "expecting boolean expressions");
skip_to_semi (cfile);
expression_dereference (&rhs, MDL);
*lose = 1;
return 0;
}
break;
case OR:
next_op = expr_or;
context = expression_context (rhs);
if (context != context_boolean)
goto needbool;
break;
case PLUS:
next_op = expr_add;
context = expression_context (rhs);
if (context != context_numeric) {
neednum:
parse_warn (cfile, "expecting numeric expressions");
skip_to_semi (cfile);
expression_dereference (&rhs, MDL);
*lose = 1;
return 0;
}
break;
case MINUS:
next_op = expr_subtract;
context = expression_context (rhs);
if (context != context_numeric)
goto neednum;
break;
case SLASH:
next_op = expr_divide;
context = expression_context (rhs);
if (context != context_numeric)
goto neednum;
break;
case ASTERISK:
next_op = expr_multiply;
context = expression_context (rhs);
if (context != context_numeric)
goto neednum;
break;
case PERCENT:
next_op = expr_remainder;
context = expression_context (rhs);
if (context != context_numeric)
goto neednum;
break;
case AMPERSAND:
next_op = expr_binary_and;
context = expression_context (rhs);
if (context != context_numeric)
goto neednum;
break;
case PIPE:
next_op = expr_binary_or;
context = expression_context (rhs);
if (context != context_numeric)
goto neednum;
break;
case CARET:
next_op = expr_binary_xor;
context = expression_context (rhs);
if (context != context_numeric)
goto neednum;
break;
default:
@ -4063,6 +4031,63 @@ int parse_expression (expr, cfile, lose, context, plhs, binop)
goto new_rhs;
}
if (binop != expr_none) {
if (expression_context (rhs) != expression_context (lhs)) {
parse_warn (cfile, "illegal expression relating different types");
skip_to_semi (cfile);
expression_dereference (&rhs, MDL);
expression_dereference (&lhs, MDL);
*lose = 1;
return 0;
}
switch(binop) {
case expr_not_equal:
case expr_equal:
if ((expression_context(rhs) != context_data_or_numeric) &&
(expression_context(rhs) != context_data) &&
(expression_context(rhs) != context_numeric)) {
parse_warn (cfile, "expecting data/numeric expression");
skip_to_semi (cfile);
expression_dereference (&rhs, MDL);
*lose = 1;
return 0;
}
break;
case expr_and:
case expr_or:
if (expression_context(rhs) != context_boolean) {
parse_warn (cfile, "expecting boolean expressions");
skip_to_semi (cfile);
expression_dereference (&rhs, MDL);
*lose = 1;
return 0;
}
break;
case expr_add:
case expr_subtract:
case expr_divide:
case expr_multiply:
case expr_remainder:
case expr_binary_and:
case expr_binary_or:
case expr_binary_xor:
if (expression_context(rhs) != context_numeric) {
parse_warn (cfile, "expecting numeric expressions");
skip_to_semi (cfile);
expression_dereference (&rhs, MDL);
*lose = 1;
return 0;
}
break;
default:
break;
}
}
/* Now, if we didn't find a binary operator, we're done parsing
this subexpression, so combine it with the preceding binary
operator and return the result. */

View File

@ -3,7 +3,7 @@
Turn data structures into printable text. */
/*
* Copyright (c) 1995-2001 Internet Software Consortium.
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: print.c,v 1.4 2002/06/11 14:00:02 drochner Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: print.c,v 1.5 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -16,7 +16,7 @@
Sigh. */
/*
* Copyright (c) 1995-2000 Internet Software Consortium.
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -56,7 +56,7 @@
#ifndef lint
static char copyright[] =
"$Id: raw.c,v 1.2 2002/06/10 00:30:34 itojun Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
"$Id: raw.c,v 1.3 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,7 +3,7 @@
Parser for /etc/resolv.conf file. */
/*
* Copyright (c) 1996-2001 Internet Software Consortium.
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: resolv.c,v 1.2 2002/06/10 00:30:34 itojun Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: resolv.c,v 1.3 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,7 +3,7 @@
BSD socket interface code... */
/*
* Copyright (c) 1995-2000 Internet Software Consortium.
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -51,7 +51,7 @@
#ifndef lint
static char copyright[] =
"$Id: socket.c,v 1.4 2002/06/11 14:00:02 drochner Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
"$Id: socket.c,v 1.5 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -120,8 +120,8 @@ int if_register_socket (info)
once = 1;
#endif
memset (&name, 0, sizeof (name));
/* Set up the address we're going to bind to. */
memset(&name, 0, sizeof(name));
name.sin_family = AF_INET;
name.sin_port = local_port;
name.sin_addr = local_address;

View File

@ -3,7 +3,7 @@
Tables of information... */
/*
* Copyright (c) 1995-2001 Internet Software Consortium.
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: tables.c,v 1.3 2002/06/11 14:00:02 drochner Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: tables.c,v 1.4 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -37,7 +37,7 @@
#ifndef lint
static char copyright[] =
"$Id: tr.c,v 1.1.1.2 2003/02/18 16:37:57 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: tr.c,v 1.2 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,7 +3,7 @@
Routines for manipulating parse trees... */
/*
* Copyright (c) 1995-2001 Internet Software Consortium.
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: tree.c,v 1.3 2002/06/11 14:00:02 drochner Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
"$Id: tree.c,v 1.4 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: upf.c,v 1.1.1.2 2003/02/18 16:37:57 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: upf.c,v 1.2 2003/02/18 17:08:42 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,7 +3,7 @@
The dhcpctl callback object. */
/*
* Copyright (c) 1999-2000 Internet Software Consortium.
* Copyright (c) 1999-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -3,7 +3,7 @@
Subroutines providing general support for objects. */
/*
* Copyright (c) 1999-2000 Internet Software Consortium.
* Copyright (c) 1999-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -3,7 +3,7 @@
Examine and modify omapi objects. */
/*
* Copyright (c) 2001 Internet Software Consortium.
* Copyright (c) 2001-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -483,6 +483,7 @@ int main (int argc, char **argv, char **envp)
val = buf;
do {
int intval = atoi (val);
dotiszero:
if (intval > 255) {
parse_warn (cfile,
"dotted octet > 255: %s",
@ -495,8 +496,10 @@ int main (int argc, char **argv, char **envp)
(unsigned *)0, cfile);
if (token != DOT)
break;
token = next_token (&val,
(unsigned *)0, cfile);
/* DOT is zero. */
while ((token = next_token (&val,
(unsigned *)0, cfile)) == DOT)
*s++ = 0;
} while (token == NUMBER);
dhcpctl_set_data_value (oh, buf,
(unsigned)(s - buf),

View File

@ -3,7 +3,7 @@
The dhcpctl remote object. */
/*
* Copyright (c) 1999-2000 Internet Software Consortium.
* Copyright (c) 1999-2003 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -248,9 +248,16 @@ dhcpctl_status dhcpctl_open_object (dhcpctl_handle h,
omapi_object_dereference (&message, MDL);
return status;
}
return omapi_protocol_send_message (connection -> outer,
status = omapi_protocol_send_message (connection -> outer,
(omapi_object_t *)0,
message, (omapi_object_t *)0);
if (status != ISC_R_SUCCESS)
omapi_message_unregister (message);
omapi_object_dereference (&message, MDL);
return status;
}
/* Callback methods (not meant to be called directly) */
@ -338,6 +345,9 @@ isc_result_t dhcpctl_remote_destroy (omapi_object_t *h,
if (p -> handle)
omapi_object_dereference ((omapi_object_t **)&p -> handle,
file, line);
if (p -> rtype)
omapi_typed_data_dereference ((omapi_typed_data_t **)&p->rtype,
file, line);
return ISC_R_SUCCESS;
}

View File

@ -1,7 +1,7 @@
#ifdef HMAC_MD5
#if !defined(LINT)
#ifndef LINT
#if 0
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/hmac_link.c,v 1.2 2002/06/15 01:32:13 matt Exp $";
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/hmac_link.c,v 1.3 2003/02/18 17:08:42 drochner Exp $";
#endif
#endif
/*

View File

@ -271,7 +271,7 @@ typedef enum {
FTS_RELEASED = 4,
FTS_ABANDONED = 5,
FTS_RESET = 6,
FTS_BACKUP = 7,
FTS_BACKUP = 7
} binding_state_t;
/* FTS_LAST is the highest value that is valid for a lease binding state. */
@ -648,7 +648,7 @@ struct client_lease {
struct auth_key *key; /* Key used in basic DHCP authentication. */
unsigned int is_static : 1; /* If set, lease is from config file. */
unsigned int is_bootp: 1; /* If set, lease was acquired with BOOTP. */
unsigned int is_bootp: 1; /* If set, lease was acquired with BOOTP. */
struct option_state *options; /* Options supplied with lease. */
};
@ -903,6 +903,8 @@ typedef unsigned char option_mask [16];
#define _PATH_DHCPD_CONF "dhcpd.conf"
#undef _PATH_DHCPD_DB
#define _PATH_DHCPD_DB "dhcpd.leases"
#undef _PATH_DHCPD_PID
#define _PATH_DHCPD_PID "dhcpd.pid"
#else
#ifndef _PATH_DHCPD_CONF
#define _PATH_DHCPD_CONF "/etc/dhcpd.conf"

View File

@ -1,3 +1,3 @@
/* Current version of ISC DHCP Distribution. */
#define DHCP_VERSION "V3.0.1rc9"
#define DHCP_VERSION "V3.0.1rc11"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996,1999 by Internet Software Consortium.
* Copyright (c) 1996,1999-2003 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@ -16,7 +16,7 @@
*/
#ifndef lint
static const char rcsid[] = "$Id: ns_name.c,v 1.2 2003/01/15 00:29:13 groo Exp $";
static const char rcsid[] = "$Id: ns_name.c,v 1.3 2003/02/18 17:08:43 drochner Exp $";
#endif
#include <sys/types.h>
@ -65,6 +65,11 @@ ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) {
dn = dst;
eom = dst + dstsiz;
if (dn >= eom) {
errno = EMSGSIZE;
return (-1);
}
while ((n = *cp++) != 0) {
if ((n & NS_CMPRSFLGS) != 0) {
/* Some kind of compression pointer. */
@ -259,7 +264,6 @@ ns_name_ntol(const u_char *src, u_char *dst, size_t dstsiz) {
errno = EMSGSIZE;
return (-1);
}
while ((n = *cp++) != 0) {
if ((n & NS_CMPRSFLGS) != 0) {
/* Some kind of compression pointer. */

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995,1999 by Internet Software Consortium.
* Copyright (c) 1995,1999-2003 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@ -16,7 +16,7 @@
*/
#ifndef lint
static const char rcsid[] = "$Id: ns_samedomain.c,v 1.2 2001/08/03 13:07:05 drochner Exp $";
static const char rcsid[] = "$Id: ns_samedomain.c,v 1.3 2003/02/18 17:08:43 drochner Exp $";
#endif
#include <sys/types.h>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999-2001 by Internet Software Consortium, Inc.
* Copyright (c) 1999-2003 by Internet Software Consortium, Inc.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@ -16,7 +16,7 @@
*/
#ifndef lint
static const char rcsid[] = "$Id: ns_sign.c,v 1.2 2001/08/03 13:07:05 drochner Exp $";
static const char rcsid[] = "$Id: ns_sign.c,v 1.3 2003/02/18 17:08:43 drochner Exp $";
#endif
#if defined (TRACING)

View File

@ -1,9 +1,9 @@
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "$Id: res_findzonecut.c,v 1.3 2002/03/18 20:25:58 bjh21 Exp $";
static const char rcsid[] = "$Id: res_findzonecut.c,v 1.4 2003/02/18 17:08:43 drochner Exp $";
#endif /* not lint */
/*
* Copyright (c) 1999 by Internet Software Consortium.
* Copyright (c) 1999-2003 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above

View File

@ -4,7 +4,7 @@
protocol... */
/*
* Copyright (c) 1999-2001 Internet Software Consortium.
* Copyright (c) 1999-2003 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -820,10 +820,10 @@ isc_result_t omapi_typed_data_new (const char *file, int line,
obj = va_arg (l, omapi_object_t *);
break;
default:
va_end(l);
va_end (l);
return ISC_R_INVALIDARG;
}
va_end(l);
va_end (l);
new = dmalloc (len, file, line);
if (!new)

View File

@ -3,7 +3,7 @@
Subroutines for dealing with message objects. */
/*
* Copyright (c) 1999-2000 Internet Software Consortium.
* Copyright (c) 1999-2003 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -325,6 +325,7 @@ isc_result_t omapi_message_unregister (omapi_object_t *mo)
omapi_object_reference ((void *)&n,
(omapi_object_t *)m -> next, MDL);
omapi_object_dereference ((omapi_object_t **)&m -> next, MDL);
omapi_object_dereference ((omapi_object_t **)&n -> prev, MDL);
}
if (m -> prev) {
omapi_message_object_t *tmp = (omapi_message_object_t *)0;
@ -705,10 +706,15 @@ omapi_message_process_internal (omapi_object_t *mo, omapi_object_t *po)
status = omapi_protocol_send_status
(po, message -> id_object, ISC_R_SUCCESS,
message -> id, (char *)0);
if (m)
if (m) {
omapi_signal ((omapi_object_t *)m,
"status", ISC_R_SUCCESS,
(omapi_typed_data_t *)0);
omapi_message_unregister ((omapi_object_t *)m);
}
omapi_object_dereference (&object, MDL);
return status;
case OMAPI_OP_NOTIFY:
@ -738,6 +744,9 @@ omapi_message_process_internal (omapi_object_t *mo, omapi_object_t *po)
omapi_signal ((omapi_object_t *)m, "status", waitstatus, tv);
if (status == ISC_R_SUCCESS)
omapi_value_dereference (&tv, MDL);
omapi_message_unregister((omapi_object_t *)m);
return ISC_R_SUCCESS;
case OMAPI_OP_DELETE:

View File

@ -35,6 +35,9 @@
.\" Enterprises. To learn more about the Internet Software Consortium,
.\" see ``http://www.isc.org/isc''. To learn more about Vixie
.\" Enterprises, see ``http://www.vix.com''.
.\"
.\" $Id: dhcrelay.8,v 1.5 2003/02/18 17:08:43 drochner Exp $
.\"
.TH dhcrelay 8
.SH NAME
dhcrelay - Dynamic Host Configuration Protocol Relay Agent
@ -245,7 +248,7 @@ has been written for the Internet Software Consortium
by Ted Lemon in cooperation with Vixie
Enterprises. To learn more about the Internet Software Consortium,
see
.B http://www.vix.com.
.B http://www.isc.org/isc.
To learn more about Vixie
Enterprises, see
.B http://www.vix.com.

View File

@ -43,7 +43,7 @@
#ifndef lint
static char ocopyright[] =
"$Id: dhcrelay.c,v 1.4 2002/06/11 14:00:04 drochner Exp $ Copyright (c) 1997-2000 Internet Software Consortium. All rights reserved.\n";
"$Id: dhcrelay.c,v 1.5 2003/02/18 17:08:43 drochner Exp $ Copyright (c) 1997-2002 Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -107,7 +107,7 @@ struct server_list {
struct sockaddr_in to;
} *servers;
static const char copyright [] = "Copyright 1997-2000 Internet Software Consortium.";
static const char copyright [] = "Copyright 1997-2002 Internet Software Consortium.";
static const char arr [] = "All rights reserved.";
static const char message [] = "Internet Software Consortium DHCP Relay Agent";
static const char url [] = "For info, please visit http://www.isc.org/products/DHCP";
@ -509,6 +509,14 @@ int parse_allow_deny (struct option_cache **oc, struct parse *p, int i)
return 0;
}
/* As a wise man once said in dhcpctl/omshell.c: */
/* Sigh */
isc_result_t dhcp_set_control_state (control_object_state_t oldstate,
control_object_state_t newstate)
{
return ISC_R_SUCCESS;
}
#endif
/* Strip any Relay Agent Information options from the DHCP packet

View File

@ -3,7 +3,7 @@
BOOTP Protocol support. */
/*
* Copyright (c) 1995-2001 Internet Software Consortium.
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: bootp.c,v 1.2 2002/06/10 00:30:37 itojun Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
"$Id: bootp.c,v 1.3 2003/02/18 17:08:44 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,7 +3,7 @@
Handling for client classes. */
/*
* Copyright (c) 1998-2000 Internet Software Consortium.
* Copyright (c) 1998-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: class.c,v 1.2 2002/06/11 14:00:04 drochner Exp $ Copyright (c) 1998-2000 The Internet Software Consortium. All rights reserved.\n";
"$Id: class.c,v 1.3 2003/02/18 17:08:44 drochner Exp $ Copyright (c) 1998-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */

View File

@ -3,7 +3,7 @@
Parser for dhcpd config file... */
/*
* Copyright (c) 1995-2002 Internet Software Consortium.
* Copyright (c) 1995-2003 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: confpars.c,v 1.4 2002/06/11 14:15:14 drochner Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: confpars.c,v 1.5 2003/02/18 17:08:44 drochner Exp $ Copyright (c) 1995-2003 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -973,7 +973,19 @@ void parse_failover_peer (cfile, group, type)
return;
}
} while (token != RBRACE);
/* me.address can be null; the failover link initiate code tries to
* derive a reasonable address to use.
*/
if (!peer -> partner.address)
parse_warn (cfile, "peer address may not be omitted");
/* XXX - when/if we get a port number assigned, just set as default */
if (!peer -> me.port)
parse_warn (cfile, "local port may not be omitted");
if (!peer -> partner.port)
parse_warn (cfile, "peer port may not be omitted");
if (peer -> i_am == primary) {
if (!peer -> hba) {
parse_warn (cfile,
@ -1259,9 +1271,6 @@ void parse_pool_statement (cfile, group, type)
log_fatal ("no memory for pool: %s",
isc_result_totext (status));
if (!clone_group (&pool -> group, group, MDL))
log_fatal ("can't clone pool group.");
if (type == SUBNET_DECL)
shared_network_reference (&pool -> shared_network,
group -> subnet -> shared_network,
@ -1270,6 +1279,9 @@ void parse_pool_statement (cfile, group, type)
shared_network_reference (&pool -> shared_network,
group -> shared_network, MDL);
if (!clone_group (&pool -> group, pool -> shared_network -> group, MDL))
log_fatal ("can't clone pool group.");
#if defined (FAILOVER_PROTOCOL)
/* Inherit the failover peer from the shared network. */
if (pool -> shared_network -> failover_peer)
@ -1912,7 +1924,7 @@ int parse_class_declaration (cp, cfile, group, type)
!class_new_hash (&pc -> hash, 0, MDL))
log_fatal ("No memory for subclass hash.");
class_hash_add (pc -> hash,
class -> hash_string.data,
(const char *)class -> hash_string.data,
class -> hash_string.len,
(void *)class, MDL);
} else {
@ -1988,16 +2000,16 @@ int parse_class_declaration (cp, cfile, group, type)
skip_to_semi (cfile);
break;
}
token = next_token (&val, (unsigned *)0, cfile);
token = peek_token (&val, (unsigned *)0, cfile);
if (token != IF)
goto submatch;
if (class -> expr) {
parse_warn (cfile, "can't override match.");
skip_to_semi (cfile);
break;
}
token = next_token (&val, (unsigned *)0, cfile);
token = peek_token (&val, (unsigned *)0, cfile);
if (token != IF)
goto submatch;
token = next_token (&val, (unsigned *)0, cfile);
if (!parse_boolean_expression (&class -> expr, cfile,
&lose)) {
if (!lose) {
@ -2241,9 +2253,13 @@ void parse_subnet_declaration (cfile, share)
/* Validate the network number/netmask pair. */
if (host_addr (subnet -> net, subnet -> netmask)) {
char *maskstr;
maskstr = strdup (piaddr (subnet -> netmask));
parse_warn (cfile,
"subnet %s: bad subnet number/mask combination.",
piaddr (subnet -> net));
"subnet %s netmask %s: bad subnet number/mask combination.",
piaddr (subnet -> net), maskstr);
free(maskstr);
subnet_dereference (&subnet, MDL);
skip_to_semi (cfile);
return;

28
dist/dhcp/server/db.c vendored
View File

@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: db.c,v 1.3 2002/06/11 14:00:04 drochner Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: db.c,v 1.4 2003/02/18 17:08:44 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -255,21 +255,17 @@ int write_lease (lease)
pair p;
memset (&ds, 0, sizeof ds);
if (lease -> agent_options) {
for (p = lease -> agent_options -> first; p; p = p -> cdr) {
oc = (struct option_cache *)p -> car;
if (oc -> data.len) {
errno = 0;
fprintf (db_file, "\n option agent.%s %s;",
oc -> option -> name,
pretty_print_option (oc -> option,
oc -> data.data,
oc -> data.len,
1, 1));
if (errno)
++errors;
}
}
for (p = lease -> agent_options -> first; p; p = p -> cdr) {
oc = (struct option_cache *)p -> car;
if (oc -> data.len) {
errno = 0;
fprintf (db_file, "\n option agent.%s %s;",
oc -> option -> name,
pretty_print_option (oc -> option, oc -> data.data,
oc -> data.len, 1, 1));
if (errno)
++errors;
}
}
}
if (lease -> client_hostname &&

View File

@ -3,7 +3,7 @@
Dynamic DNS updates. */
/*
* Copyright (c) 2000-2001 Internet Software Consortium.
* Copyright (c) 2000-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: ddns.c,v 1.3 2002/06/11 14:00:04 drochner Exp $ Copyright (c) 2000-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: ddns.c,v 1.4 2003/02/18 17:08:44 drochner Exp $ Copyright (c) 2000-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,7 +3,7 @@
DHCP Protocol engine. */
/*
* Copyright (c) 1995-2001 Internet Software Consortium.
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: dhcp.c,v 1.3 2002/06/11 14:00:05 drochner Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: dhcp.c,v 1.4 2003/02/18 17:08:44 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -1554,19 +1554,6 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
: lease -> subnet -> group));
}
/* If we have a host_decl structure, run the options associated
with its group. */
if (lease -> host)
execute_statements_in_scope ((struct binding_value **)0,
packet, lease,
(struct client_state *)0,
packet -> options,
state -> options, &lease -> scope,
lease -> host -> group,
(lease -> pool
? lease -> pool -> group
: lease -> subnet -> group));
/* See if the client is only supposed to have one lease at a time,
and if so, find its other leases and release them. We can only
do this on DHCPREQUEST. It's a little weird to do this before
@ -1740,6 +1727,19 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
host_dereference (&hp, MDL);
}
/* If we have a host_decl structure, run the options associated
with its group. Wether the host decl struct is old or not. */
if (lease -> host)
execute_statements_in_scope ((struct binding_value **)0,
packet, lease,
(struct client_state *)0,
packet -> options,
state -> options, &lease -> scope,
lease -> host -> group,
(lease -> pool
? lease -> pool -> group
: lease -> subnet -> group));
/* Drop the request if it's not allowed for this client. By
default, unknown clients are allowed. */
if (!lease -> host &&

View File

@ -1,6 +1,6 @@
.\" dhcpd.8
.\"
.\" Copyright (c) 1996-2001 Internet Software Consortium.
.\" Copyright (c) 1996-2002 Internet Software Consortium.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
@ -34,6 +34,9 @@
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
.\" $Id: dhcpd.8,v 1.5 2003/02/18 17:08:44 drochner Exp $
.\"
.TH dhcpd 8
.SH NAME
dhcpd - Dynamic Host Configuration Protocol Server

View File

@ -3,7 +3,7 @@
DHCP Server Daemon. */
/*
* Copyright (c) 1996-2001 Internet Software Consortium.
* Copyright (c) 1996-2003 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,11 +43,11 @@
#ifndef lint
static char ocopyright[] =
"$Id: dhcpd.c,v 1.3 2002/06/11 14:00:05 drochner Exp $ Copyright 1995-2001 Internet Software Consortium.";
"$Id: dhcpd.c,v 1.4 2003/02/18 17:08:44 drochner Exp $ Copyright 1995-2003 Internet Software Consortium.";
#endif
static char copyright[] =
"Copyright 1995-2001 Internet Software Consortium.";
"Copyright 1995-2003 Internet Software Consortium.";
static char arr [] = "All rights reserved.";
static char message [] = "Internet Software Consortium DHCP Server";
static char url [] = "For info, please visit http://www.isc.org/products/DHCP";

View File

@ -1,6 +1,6 @@
.\" dhcpd.conf.5
.\"
.\" Copyright (c) 1996-2001 Internet Software Consortium.
.\" Copyright (c) 1996-2002 Internet Software Consortium.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
@ -34,6 +34,9 @@
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
.\" $Id: dhcpd.conf.5,v 1.8 2003/02/18 17:08:44 drochner Exp $
.\"
.TH dhcpd.conf 5
.SH NAME
dhcpd.conf - dhcpd configuration file

View File

@ -1,6 +1,6 @@
.\" dhcpd.leases.5
.\"
.\" Copyright (c) 1996-2001 Internet Software Consortium.
.\" Copyright (c) 1996-2002 Internet Software Consortium.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
@ -34,6 +34,9 @@
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
.\" $Id: dhcpd.leases.5,v 1.5 2003/02/18 17:08:44 drochner Exp $
.\"
.TH dhcpd.leases 5
.SH NAME
dhcpd.leases - DHCP client lease database

View File

@ -3,7 +3,7 @@
OMAPI object interfaces for the DHCP server. */
/*
* Copyright (c) 1999-2001 Internet Software Consortium.
* Copyright (c) 1999-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -50,7 +50,7 @@
#ifndef lint
static char copyright[] =
"$Id: omapi.c,v 1.4 2002/06/11 14:17:27 drochner Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: omapi.c,v 1.5 2003/02/18 17:08:44 drochner Exp $ Copyright (c) 1999-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -243,8 +243,8 @@ isc_result_t dhcp_lease_set_value (omapi_object_t *h,
if (lease -> binding_state != bar) {
lease -> next_binding_state = bar;
if (supersede_lease (lease, 0, 1, 1, 1)) {
log_info ("lease state changed from %s to %s",
ols, nls);
log_info ("lease %s state changed from %s to %s",
piaddr(lease->ip_addr), ols, nls);
return ISC_R_SUCCESS;
}
log_info ("lease state change from %s to %s failed.",

View File

@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: salloc.c,v 1.1.1.2 2003/02/18 16:38:03 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: salloc.c,v 1.2 2003/02/18 17:08:45 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

File diff suppressed because it is too large Load Diff