From owner-cvs-all Sat Jul 21 21: 9:20 2001 Delivered-To: cvs-all@freebsd.org Received: from light.imasy.or.jp (light.imasy.or.jp [202.227.24.4]) by hub.freebsd.org (Postfix) with ESMTP id 0248037B401; Sat, 21 Jul 2001 21:09:13 -0700 (PDT) (envelope-from ume@mahoroba.org) Received: (from uucp@localhost) by light.imasy.or.jp (8.11.3+3.4W/8.11.3/light) with UUCP id f6M48vu26586; Sun, 22 Jul 2001 13:08:57 +0900 (JST) (envelope-from ume@mahoroba.org) Received: from peace.mahoroba.org (IDENT:TZhqQbFA4lpiiAk+Yqqd7HZRSLabbYGArQiV5lrWxOl1/2IxaRbfs4n69lUNfuUh@peace.mahoroba.org [2001:200:301:0:200:f8ff:fe05:3eae]) (authenticated as ume with CRAM-MD5) by mail.mahoroba.org (8.11.4/8.11.4/chaos) with ESMTP/inet6 id f6M45cL25762; Sun, 22 Jul 2001 13:05:39 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Sun, 22 Jul 2001 13:05:34 +0900 (JST) Message-Id: <20010722.130534.28837728.ume@mahoroba.org> To: brian@Awfulhak.org Cc: brian@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libutil realhostname.c From: Hajimu UMEMOTO In-Reply-To: <200107212222.f6LMMtg79753@hak.lan.Awfulhak.org> References: <200107212222.f6LMMtg79753@hak.lan.Awfulhak.org> X-Mailer: xcite1.38> Mew version 1.95b119 on Emacs 20.7 / Mule 4.0 =?iso-2022-jp?B?KBskQjJWMWMbKEIp?= X-PGP-Public-Key: http://www.imasy.org/~ume/publickey.asc X-PGP-Fingerprint: 6B 0C 53 FC 5D D0 37 91 05 D0 B3 EF 36 9B 6A BC X-URL: http://www.imasy.org/~ume/ X-Operating-System: FreeBSD 5.0-CURRENT Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, >>>>> On Sat, 21 Jul 2001 23:22:55 +0100 >>>>> Brian Somers said: brian> Do you mean ::ffff:a.b.c.d type addresses ? I'm probably Yes. brian> mis-understanding things. Can you give me an example of how such a brian> connection is supposed to work ? I mean... if ::ffff:* addresses brian> aren't supposed to understand IPv6, why are they a concern ? I'm brian> clearly missing something. In default settings of FreeBSD, IPv4 mapped IPv6 address is enabled. And, most of IPv6 support codes in basic part of FreeBSD concern about it. For example, you can specify `tcp46' in inetd.conf to use it. Make sure to don't specify `tcp' for the same service. You can try it with sshd too. For sshd, you can specify `ListenAddress ::' in sshd_config. brian> My change was done because the normal IPv6 scenario doesn't work at brian> the moment (where I have gw.lan.Awfulhak.org resolving an A request brian> to 172.16.0.1 and an AAAA request to fec0::1). When I connect from brian> fec0::1 it simply fails to resolve using AF_UNSPEC and dumps fec0::1 brian> in utmp :( Umm, it's a site-local address. Since site-local address is a scoped address, we may need some other concern to play with it. Does this work for you? Index: lib/libutil/realhostname.c diff -u lib/libutil/realhostname.c.orig lib/libutil/realhostname.c --- lib/libutil/realhostname.c.orig Sun Jul 22 04:47:07 2001 +++ lib/libutil/realhostname.c Sun Jul 22 13:01:24 2001 @@ -96,7 +96,8 @@ result = HOSTNAME_INVALIDADDR; - error = getnameinfo(addr, addrlen, buf, sizeof(buf), NULL, 0, 0); + error = getnameinfo(addr, addrlen, buf, sizeof(buf), NULL, 0, + NI_WITHSCOPEID); if (error == 0) { struct addrinfo hints, *res, *ores; struct sockaddr *sa; -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message