NSD v2.2.0

This commit is contained in:
jakob 2005-01-31 18:25:39 +00:00
parent d4b5d8837d
commit 4ef3553c4e
4 changed files with 87 additions and 18 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.25 2005/01/07 10:05:32 jakob Exp $
# $OpenBSD: Makefile,v 1.26 2005/01/31 18:25:39 jakob Exp $
COMMENT= "authoritative-only name server daemon"
VERSION= 2.1.5
VERSION= 2.2.0
DISTNAME= nsd-${VERSION}
CATEGORIES= net
@ -16,15 +16,13 @@ PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c wrap
RUN_DEPENDS= :named-xfer-*:net/named-xfer
WANTLIB= c wrap crypto
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= --enable-dnssec \
--enable-bind8-stats \
--with-namedxfer=${LOCALBASE}/libexec/named-xfer \
--with-libwrap=/usr/lib \
--with-ssl=/usr \
--with-user=named \
--with-pidfile=/var/run/nsd.pid \
--with-zonesdir=/var/nsd \
@ -32,20 +30,21 @@ CONFIGURE_ARGS+= --enable-dnssec \
NO_REGRESS= Yes
EXE= nsd nsd-notify nsd-xfer zonec
MAN8= nsd.8 nsd-notify.8 nsd-xfer.8 zonec.8 nsdc.8
DOCDIR= share/doc/nsd
DOCFILES= README RELNOTES CREDITS DIFFERENCES REQUIREMENTS
EXAMPLESDIR= share/examples/nsd
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/nsd ${PREFIX}/sbin
${INSTALL_PROGRAM} ${WRKSRC}/nsd-notify ${PREFIX}/sbin
${INSTALL_PROGRAM} ${WRKSRC}/zonec ${PREFIX}/sbin
.for f in ${EXE}
${INSTALL_PROGRAM} ${WRKSRC}/${f} ${PREFIX}/sbin
.endfor
${INSTALL_SCRIPT} ${WRKSRC}/nsdc.sh ${PREFIX}/sbin/nsdc
${INSTALL_MAN} ${WRKSRC}/nsd.8 ${PREFIX}/man/man8
${INSTALL_MAN} ${WRKSRC}/nsd-notify.8 ${PREFIX}/man/man8
${INSTALL_MAN} ${WRKSRC}/nsdc.8 ${PREFIX}/man/man8
${INSTALL_MAN} ${WRKSRC}/zonec.8 ${PREFIX}/man/man8
.for f in ${MAN8}
${INSTALL_MAN} ${WRKSRC}/${f} ${PREFIX}/man/man8
.endfor
${INSTALL_DATA_DIR} ${PREFIX}/${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/nsd.zones.sample ${PREFIX}/${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/nsdc.conf.sample ${PREFIX}/${EXAMPLESDIR}

View File

@ -1,4 +1,4 @@
MD5 (nsd-2.1.5.tar.gz) = 24e81b2bb25f0663e153e174bb585f04
RMD160 (nsd-2.1.5.tar.gz) = b6b11c95b9b31c91f0332697b40a77ccd9b54177
SHA1 (nsd-2.1.5.tar.gz) = f1658c4a18efb38b22537f900ac70bcd7deb06ee
SIZE (nsd-2.1.5.tar.gz) = 225543
MD5 (nsd-2.2.0.tar.gz) = e84b8e9d03062710ea847ea146ccb5d5
RMD160 (nsd-2.2.0.tar.gz) = 1a073b668ede113afd4eb07556376f0f8f95bf11
SHA1 (nsd-2.2.0.tar.gz) = 4a9e1d6c822ccda8c49884ee97246120fb30926a
SIZE (nsd-2.2.0.tar.gz) = 230431

View File

@ -0,0 +1,65 @@
$OpenBSD: patch-rdata_c,v 1.1 2005/01/31 18:25:39 jakob Exp $
--- rdata.c.orig Mon Dec 27 17:18:27 2004
+++ rdata.c Wed Jan 19 11:09:54 2005
@@ -441,15 +441,7 @@ rdata_wireformat_to_rdata_atoms(region_t
for (i = 0; i < descriptor->maximum; ++i) {
int is_domain = 0;
size_t length = 0;
-
- if (buffer_position(packet) == end) {
- if (i < descriptor->minimum) {
- region_destroy(temp_region);
- return -1;
- } else {
- break;
- }
- }
+ int required = i < descriptor->minimum;
switch (rdata_atom_wireformat_type(rrtype, i)) {
case RDATA_WF_COMPRESSED_DNAME:
@@ -491,9 +483,16 @@ rdata_wireformat_to_rdata_atoms(region_t
}
if (is_domain) {
- const dname_type *dname = dname_make_from_packet(
+ const dname_type *dname;
+
+ if (!required && buffer_position(packet) == end) {
+ break;
+ }
+
+ dname = dname_make_from_packet(
temp_region, packet, 1, 1);
- if (!dname) {
+ if (!dname || buffer_position(packet) > end) {
+ /* Error in domain name. */
region_destroy(temp_region);
return -1;
}
@@ -501,9 +500,13 @@ rdata_wireformat_to_rdata_atoms(region_t
= domain_table_insert(owners, dname);
} else {
if (buffer_position(packet) + length > end) {
-/* zc_error_prev_line("unknown RDATA is truncated"); */
- region_destroy(temp_region);
- return -1;
+ if (required) {
+ /* Truncated RDATA. */
+ region_destroy(temp_region);
+ return -1;
+ } else {
+ break;
+ }
}
temp_rdatas[i].data = (uint16_t *) region_alloc(
@@ -514,7 +517,7 @@ rdata_wireformat_to_rdata_atoms(region_t
}
if (buffer_position(packet) < end) {
-/* zc_error_prev_line("unknown RDATA has trailing garbage"); */
+ /* Trailing garbage. */
region_destroy(temp_region);
return -1;
}

View File

@ -1,10 +1,12 @@
@comment $OpenBSD: PLIST,v 1.5 2004/09/15 18:17:42 espie Exp $
@comment $OpenBSD: PLIST,v 1.6 2005/01/31 18:25:39 jakob Exp $
@man man/man8/nsd-notify.8
@man man/man8/nsd-xfer.8
@man man/man8/nsd.8
@man man/man8/nsdc.8
@man man/man8/zonec.8
sbin/nsd
sbin/nsd-notify
sbin/nsd-xfer
sbin/nsdc
sbin/zonec
share/doc/nsd/
@ -16,3 +18,6 @@ share/doc/nsd/REQUIREMENTS
share/examples/nsd/
share/examples/nsd/nsd.zones.sample
share/examples/nsd/nsdc.conf.sample
@extra /etc/nsd.zones
@extra /etc/nsdc.conf
@extra /etc/nsd