Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Apr 2012 16:41:52 +0000
From:      "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
To:        Hajimu UMEMOTO <ume@FreeBSD.org>
Cc:        freebsd-net@FreeBSD.org, Rainer Bredehorn <Bredehorn@gmx.de>, Andrew Thompson <thompsa@FreeBSD.org>
Subject:   Re: getifaddrs & ipv6 scope
Message-ID:  <7153D609-0E71-435A-B076-27BD6C3AEA04@lists.zabbadoz.net>
In-Reply-To: <yged37becg7.wl%ume@mahoroba.org>
References:  <20120413064142.10640@gmx.net> <CAFAOGNRLcadCMCZ8WjaFi3XYhzV55Tp0v=%2BoMGyLOv666bFHkA@mail.gmail.com> <yged37becg7.wl%ume@mahoroba.org>

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

On 13. Apr 2012, at 18:03 , Hajimu UMEMOTO wrote:

> Hi,
>=20
>>>>>> On Fri, 13 Apr 2012 20:01:39 +1200
>>>>>> Andrew Thompson <thompsa@FreeBSD.org> said:
>=20
> thompsa> On 13 April 2012 18:41, Rainer Bredehorn <Bredehorn@gmx.de> =
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!




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7153D609-0E71-435A-B076-27BD6C3AEA04>