Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Oct 2001 19:02:54 +0900 (JST)
From:      Yuichi SHIMODA <shimoda@rcac.tdi.co.jp>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/31632: ip6fw error under DNS dislabled environment
Message-ID:  <200110301002.f9UA2sC18635@bach.junkyard.rcac.tdi.co.jp>

next in thread | raw e-mail | index | archive | help

>Number:         31632
>Category:       bin
>Synopsis:       ip6fw error under DNS dislabled environment
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 30 02:10:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Yuichi SHIMODA
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
T.D.I. CO., LTD.
>Environment:
System: FreeBSD bach.junkyard.rcac.tdi.co.jp 4.4-STABLE FreeBSD 4.4-STABLE #0: Wed Oct 24 22:19:51 JST 2001 shimoda@octa.junkyard.rcac.tdi.co.jp:/work/obj/home2/f4s/src/sys/GENERIC i386

>Description:
when my /etc/host.conf contains no "bind" entries,
ip6fw command with ipv6 address argument shows error message.

  ip6fw: error: hostname ``ff02::'' unknown
  usage: ip6fw [options]
    :
    :

>How-To-Repeat:
edit your /etc/host.conf:
  hosts
  # bind    <-- commented out
  # nis
use ip6fw command:
  ip6fw add allow ipv6-icmp from ff02::/16 to ::
  
>Fix:
--- /usr/src/sbin/ip6fw/ip6fw.c.ORIG	Tue Aug  7 10:27:56 2001
+++ /usr/src/sbin/ip6fw/ip6fw.c	Tue Oct 30 17:38:00 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);


>Release-Note:
>Audit-Trail:
>Unformatted:

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?200110301002.f9UA2sC18635>