mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-01 14:55:30 +00:00
Support the private resolver.
This commit is contained in:
@@ -41,14 +41,15 @@ LIBS = $(BINDLIB)
|
|||||||
COPTS = $(BINDDEF)
|
COPTS = $(BINDDEF)
|
||||||
RANLIB = ranlib
|
RANLIB = ranlib
|
||||||
|
|
||||||
BINDLIBDEF = -L/usr/local/bind/lib -lbind
|
BINDLIBDEF = ../minires/libres.a
|
||||||
BINDINCDEF = -I/usr/local/bind/include
|
BINDINCDEF =
|
||||||
|
|
||||||
## Dynamic DNS update support
|
## Dynamic DNS update support
|
||||||
##--nsupdate--
|
##--nsupdate--
|
||||||
#BINDLIB = $(BINDLIBDEF)
|
#BINDLIB = $(BINDLIBDEF)
|
||||||
#BINDINC = $(BINDINCDEF)
|
#BINDINC = $(BINDINCDEF)
|
||||||
#BINDDEF = -DNSUPDATE
|
#BINDDEF = -DNSUPDATE
|
||||||
|
#MINIRES = minires
|
||||||
##--nsupdate--
|
##--nsupdate--
|
||||||
|
|
||||||
# Major version number (if applicable)
|
# Major version number (if applicable)
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
# http://www.isc.org for more information.
|
# http://www.isc.org for more information.
|
||||||
#
|
#
|
||||||
|
|
||||||
SUBDIRS= common omapip server client relay dhcpctl
|
SUBDIRS= common omapip $(MINIRES) server client relay dhcpctl
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@for dir in ${SUBDIRS}; do \
|
@for dir in ${SUBDIRS}; do \
|
||||||
|
@@ -28,7 +28,7 @@ MAN = dhclient.8 dhclient.conf.5 dhclient-script.8 dhclient.leases.5
|
|||||||
|
|
||||||
DEBUG = -g
|
DEBUG = -g
|
||||||
INCLUDES = -I.. $(BINDINC) -I../includes
|
INCLUDES = -I.. $(BINDINC) -I../includes
|
||||||
DHCPLIB = ../common/libdhcp.a ../omapip/libomapi.a
|
DHCPLIB = ../common/libdhcp.a ../omapip/libomapi.a ../minires/libres.a
|
||||||
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
|
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
|
||||||
|
|
||||||
all: $(PROG) $(CATMANPAGES)
|
all: $(PROG) $(CATMANPAGES)
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: print.c,v 1.33 2000/01/26 14:55:34 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: print.c,v 1.34 2000/02/02 07:22:33 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -898,7 +898,7 @@ void print_dns_status (int status, ns_updque *uq)
|
|||||||
const char *predicate = "if", *en, *op;
|
const char *predicate = "if", *en, *op;
|
||||||
int errorp;
|
int errorp;
|
||||||
|
|
||||||
for (u = HEAD (*uq); u; u = NEXT (u, r_link)) {
|
for (u = ISC_LIST_HEAD (*uq); u; u = ISC_LIST_NEXT (u, r_link)) {
|
||||||
ttlp = 0;
|
ttlp = 0;
|
||||||
if (s != &obuf [0] && s + 1 < end)
|
if (s != &obuf [0] && s + 1 < end)
|
||||||
*s++ = ' ';
|
*s++ = ' ';
|
||||||
@@ -1031,7 +1031,7 @@ void print_dns_status (int status, ns_updque *uq)
|
|||||||
*s++ = ' ';
|
*s++ = ' ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (u == TAIL (*uq))
|
if (u == ISC_LIST_TAIL (*uq))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (s == &obuf [0]) {
|
if (s == &obuf [0]) {
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: tree.c,v 1.71 2000/01/27 22:40:49 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: tree.c,v 1.72 2000/02/02 07:22:33 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -1771,7 +1771,7 @@ int evaluate_numeric_expression (result, packet, lease,
|
|||||||
res_ninit (&res);
|
res_ninit (&res);
|
||||||
inited = 1;
|
inited = 1;
|
||||||
}
|
}
|
||||||
INIT_LIST (uq);
|
ISC_LIST_INIT (uq);
|
||||||
cur = expr;
|
cur = expr;
|
||||||
do {
|
do {
|
||||||
next = cur -> data.dns_transaction.cdr;
|
next = cur -> data.dns_transaction.cdr;
|
||||||
@@ -1781,13 +1781,13 @@ int evaluate_numeric_expression (result, packet, lease,
|
|||||||
scope, cur -> data.dns_transaction.car));
|
scope, cur -> data.dns_transaction.car));
|
||||||
if (!status)
|
if (!status)
|
||||||
goto dns_bad;
|
goto dns_bad;
|
||||||
APPEND (uq, nut, r_link);
|
ISC_LIST_APPEND (uq, nut, r_link);
|
||||||
cur = next;
|
cur = next;
|
||||||
} while (next);
|
} while (next);
|
||||||
|
|
||||||
/* Do the update and record the error code, if there was
|
/* Do the update and record the error code, if there was
|
||||||
an error; otherwise set it to NOERROR. */
|
an error; otherwise set it to NOERROR. */
|
||||||
if (res_nupdate (&res, HEAD (uq), NULL))
|
if (res_nupdate (&res, ISC_LIST_HEAD (uq), NULL))
|
||||||
*result = NOERROR;
|
*result = NOERROR;
|
||||||
else
|
else
|
||||||
/* The resolver doesn't return any actual error
|
/* The resolver doesn't return any actual error
|
||||||
@@ -1799,9 +1799,9 @@ int evaluate_numeric_expression (result, packet, lease,
|
|||||||
print_dns_status ((int)*result, &uq);
|
print_dns_status ((int)*result, &uq);
|
||||||
|
|
||||||
dns_bad:
|
dns_bad:
|
||||||
while (!EMPTY (uq)) {
|
while (!ISC_LIST_EMPTY (uq)) {
|
||||||
ns_updrec *tmp = HEAD (uq);
|
ns_updrec *tmp = ISC_LIST_HEAD (uq);
|
||||||
UNLINK (uq, tmp, r_link);
|
ISC_LIST_UNLINK (uq, tmp, r_link);
|
||||||
if (tmp -> r_data) {
|
if (tmp -> r_data) {
|
||||||
dfree (tmp -> r_data, MDL);
|
dfree (tmp -> r_data, MDL);
|
||||||
tmp -> r_data = (char *)0;
|
tmp -> r_data = (char *)0;
|
||||||
|
2
configure
vendored
2
configure
vendored
@@ -106,7 +106,7 @@ if [ x$major != x ] && [ x$minor != x ]; then
|
|||||||
minversubst="-e /^##--minver--/,/^##--minver--/s/MinorVersion/$minor/"
|
minversubst="-e /^##--minver--/,/^##--minver--/s/MinorVersion/$minor/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for foo in . client server relay common omapip dhcpctl; do
|
for foo in . client server relay common omapip dhcpctl minires; do
|
||||||
(sed $nsupdate $majversubst $minversubst \
|
(sed $nsupdate $majversubst $minversubst \
|
||||||
-e "/^##--${sysname}--/,/^##--${sysname}--/s/^#//" \
|
-e "/^##--${sysname}--/,/^##--${sysname}--/s/^#//" \
|
||||||
<Makefile.conf; cat site.conf; cat $foo/Makefile.dist) \
|
<Makefile.conf; cat site.conf; cat $foo/Makefile.dist) \
|
||||||
|
@@ -28,7 +28,7 @@ MAN = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
|
|||||||
|
|
||||||
DEBUG = -g
|
DEBUG = -g
|
||||||
INCLUDES = -I.. $(BINDINC) -I../includes
|
INCLUDES = -I.. $(BINDINC) -I../includes
|
||||||
DHCPLIB = ../common/libdhcp.a ../omapip/libomapi.a
|
DHCPLIB = ../common/libdhcp.a ../omapip/libomapi.a ../minires/libres.a
|
||||||
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
|
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
|
||||||
|
|
||||||
all: $(PROG) $(CATMANPAGES)
|
all: $(PROG) $(CATMANPAGES)
|
||||||
|
Reference in New Issue
Block a user