Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Oct 2001 20:14:27 +0900 (JST)
From:      Yuichi SHIMODA <shimoda@rcac.tdi.co.jp>
To:        gnats-admin@FreeBSD.org, freebsd-bugs@FreeBSD.org
Subject:   Re: bin/31632: ip6fw error under DNS dislabled environment
Message-ID:  <20011030.201427.74737316.shimoda@bach.junkyard.rcac.tdi.co.jp>
In-Reply-To: <200110301010.f9UAA1k24555@freefall.freebsd.org>
References:  <200110301002.f9UA2sC18635@bach.junkyard.rcac.tdi.co.jp> <200110301010.f9UAA1k24555@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011030.201427.74737316.shimoda>