From owner-freebsd-bugs Tue Oct 30 2:10:10 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id F0A9D37B408 for ; Tue, 30 Oct 2001 02:10:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9UAA1i24559; Tue, 30 Oct 2001 02:10:01 -0800 (PST) (envelope-from gnats) 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 EC6CD37B407 for ; Tue, 30 Oct 2001 02:03:03 -0800 (PST) Received: from bach.junkyard.rcac.tdi.co.jp (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 f9UA2to92131; Tue, 30 Oct 2001 19:02:55 +0900 (JST) (envelope-from shimoda@mx.junkyard.rcac.tdi.co.jp) Received: (from shimoda@localhost) by bach.junkyard.rcac.tdi.co.jp (8.11.6/8.11.6) id f9UA2sC18635; Tue, 30 Oct 2001 19:02:54 +0900 (JST) (envelope-from shimoda) Message-Id: <200110301002.f9UA2sC18635@bach.junkyard.rcac.tdi.co.jp> Date: Tue, 30 Oct 2001 19:02:54 +0900 (JST) From: Yuichi SHIMODA Reply-To: Yuichi SHIMODA To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/31632: ip6fw error under DNS dislabled environment 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 >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