From owner-cvs-all@FreeBSD.ORG Fri Jan 2 21:42:44 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB2B216A4CE; Fri, 2 Jan 2004 21:42:44 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8020C43D2D; Fri, 2 Jan 2004 21:42:42 -0800 (PST) (envelope-from edwin@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i035gg0B022132; Fri, 2 Jan 2004 21:42:42 -0800 (PST) (envelope-from edwin@repoman.freebsd.org) Received: (from edwin@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i035ggLB022131; Fri, 2 Jan 2004 21:42:42 -0800 (PST) (envelope-from edwin) Message-Id: <200401030542.i035ggLB022131@repoman.freebsd.org> From: Edwin Groothuis Date: Fri, 2 Jan 2004 21:42:42 -0800 (PST) To: ports-committers@FreeBSD.org, cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: ports/dns/dnrd Makefile ports/dns/dnrd/files patch-main.c patch-udp.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2004 05:42:44 -0000 edwin 2004/01/02 21:42:42 PST FreeBSD ports repository Modified files: dns/dnrd Makefile dns/dnrd/files patch-main.c Added files: dns/dnrd/files patch-udp.c Log: dns/dnrd: recv_addr init wrong and 512 byte udp packets dropped 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 Revision Changes Path 1.9 +7 -4 ports/dns/dnrd/Makefile 1.2 +15 -4 ports/dns/dnrd/files/patch-main.c 1.1 +29 -0 ports/dns/dnrd/files/patch-udp.c (new)