From owner-freebsd-bugs Tue Oct 30 3:14:41 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from mx.junkyard.rcac.tdi.co.jp (mx.junkyard.rcac.tdi.co.jp [202.249.17.133]) by hub.freebsd.org (Postfix) with ESMTP id 426A737B405; Tue, 30 Oct 2001 03:14:35 -0800 (PST) Received: from localhost (bach.junkyard.rcac.tdi.co.jp [3ffe:501:40b:80::138]) by mx.junkyard.rcac.tdi.co.jp (8.11.6/8.11.6) with ESMTP id f9UBERo94892; Tue, 30 Oct 2001 20:14:29 +0900 (JST) (envelope-from shimoda@rcac.tdi.co.jp) Date: Tue, 30 Oct 2001 20:14:27 +0900 (JST) Message-Id: <20011030.201427.74737316.shimoda@bach.junkyard.rcac.tdi.co.jp> To: gnats-admin@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: bin/31632: ip6fw error under DNS dislabled environment From: Yuichi SHIMODA In-Reply-To: <200110301010.f9UAA1k24555@freefall.freebsd.org> References: <200110301002.f9UA2sC18635@bach.junkyard.rcac.tdi.co.jp> <200110301010.f9UAA1k24555@freefall.freebsd.org> X-Mailer: Mew version 2.0.55 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Sorry, I have sent wrong patch. this is right one. --- /usr/src/sbin/ip6fw/ip6fw.c.ORIG Tue Aug 7 10:27:56 2001 +++ /usr/src/sbin/ip6fw/ip6fw.c Tue Oct 30 19:55:27 2001 @@ -516,9 +516,12 @@ char *host; u_char *addr; { - struct hostent *he = gethostbyname2(host, family); + struct hostent *he; - if (!he) + if (inet_pton(family, host, addr) == 1) + return 0; + + if (!(he = gethostbyname2(host, family))) return(-1); memcpy(addr, he->h_addr_list[0], he->h_length); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message