From owner-freebsd-net@FreeBSD.ORG Sat Apr 14 16:41:56 2012 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 19499106564A; Sat, 14 Apr 2012 16:41:56 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id BE88B8FC08; Sat, 14 Apr 2012 16:41:55 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id D94E725D3860; Sat, 14 Apr 2012 16:41:54 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 1378DBE4D54; Sat, 14 Apr 2012 16:41:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id JV3VE4fufz1T; Sat, 14 Apr 2012 16:41:53 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id F0E18BE4D53; Sat, 14 Apr 2012 16:41:52 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: Date: Sat, 14 Apr 2012 16:41:52 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <7153D609-0E71-435A-B076-27BD6C3AEA04@lists.zabbadoz.net> References: <20120413064142.10640@gmx.net> To: Hajimu UMEMOTO X-Mailer: Apple Mail (2.1084) Cc: freebsd-net@FreeBSD.org, Rainer Bredehorn , Andrew Thompson Subject: Re: getifaddrs & ipv6 scope X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Apr 2012 16:41:56 -0000 On 13. Apr 2012, at 18:03 , Hajimu UMEMOTO wrote: > Hi, >=20 >>>>>> On Fri, 13 Apr 2012 20:01:39 +1200 >>>>>> Andrew Thompson said: >=20 > thompsa> On 13 April 2012 18:41, Rainer Bredehorn = wrote: >> Hi! >>=20 >>> I have noticed that getifaddrs() does not have sin6_scope_id set to >>> the interface id for link local addresses on AF_INET6 types. Running >>> the following program gives different results on Linux >>=20 >> ifconfig shows the scopeid according to the interface: >>=20 >> inet6 fe80::208:9bff:fe13:784e%fxp1 prefixlen 64 scopeid 0x2 >>=20 >> Are you talking about the scope value of an multicast address or >> the scopeid for link local addresses? >=20 > thompsa> I am talking about the scopeid for link local addresses which = (as far > thompsa> as I understand) is the interface index. >=20 > The issue you mentioned comes from an implementation decision of the > KAME IPv6 stack. > The attached patch should address it. However, it may break the > applications which expect that getifaddrs() returns a link-local > address with KAME's embeded scopeid representation. I'm not sure > there are such applications, for now. There should be none. If we have some we should fix them. I wonder if = this should actually be done in the kernel to limit the scope of the = embedded scopeid to our kernel for now? Do we have other interfaces = (ignoring kvm) that export the embedded scopeid? /bz --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do!