There are a few bugs in dnrd that should probably be fixed by the author but could be made to work on bsd: 1. Initialization in common.h of recv_addr is broken, causing at least the '-a' switch not to work. Instead of assuming positions of fields in the struct across platforms I thought it safer to do a standard initialization in main(). 2. The buffer overflow code in udp.c:dnsrecv() is off by one, rejecting messages where the size exactly fills the available buffer. I also changed to the calls to dnsrecv to pass 512 as the max size instead of the buffers that seem to be padded by 4 bytes for a reason I don't understand. This causes a calling named to resend packets. Eventually one seems to get through but response times can be painfully slow. PR: ports/41128 Submitted by: Michael C. Adler <mad1@tapil.com>
34 lines
746 B
Makefile
34 lines
746 B
Makefile
# New ports collection makefile for: dnrd
|
|
# Date created: 06 January 2001
|
|
# Whom: George Reid <greid@ukug.uk.freebsd.org>
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME= dnrd
|
|
PORTVERSION= 2.10
|
|
PORTREVISION= 1
|
|
CATEGORIES= dns
|
|
MASTER_SITES= http://users.zoominternet.net/~garsh/dnrd/archive/ \
|
|
http://www.netsw.org/net/ip/infoservice/dns/dnrd/
|
|
|
|
MAINTAINER= ports@FreeBSD.org
|
|
COMMENT= A proxy DNS daemon
|
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME}/src
|
|
|
|
USE_GMAKE= yes
|
|
USE_REINPLACE= yes
|
|
|
|
MAN8= dnrd.8
|
|
|
|
post-patch:
|
|
.for F in main.c master.c
|
|
${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/$F
|
|
.endfor
|
|
${REINPLACE_CMD} \
|
|
-e "s,cc,${CC},g" \
|
|
-e "s,-lc_r,${PTHREAD_LIBS},g" \
|
|
${WRKSRC}/Makefile
|
|
|
|
.include <bsd.port.mk>
|