From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
To: hannes@stressinduktion.org
Cc: Erik Hugne <erik.hugne@ericsson.com>,
netdev@vger.kernel.org,
YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Subject: Re: [IPv6] interface-local multicast escapes the local node
Date: Mon, 11 Feb 2013 03:42:53 +0900 [thread overview]
Message-ID: <5117EA2D.1020106@linux-ipv6.org> (raw)
In-Reply-To: <20130210153230.GA21377@order.stressinduktion.org>
Hannes Frederic Sowa wrote:
> On Sat, Feb 09, 2013 at 11:12:46PM +0900, YOSHIFUJI Hideaki wrote:
>> Hi,
>>
>> Hannes Frederic Sowa wrote:
>>> On Wed, Feb 06, 2013 at 05:54:15PM +0100, Hannes Frederic Sowa wrote:
>>>> On Thu, Feb 07, 2013 at 12:24:14AM +0900, YOSHIFUJI Hideaki wrote:
>>>>> NAK. I think we should select routes via loopback device here.
>>>>
>>>> Will try your idea, thanks.
>>>
>>> Does this patch look reasonable? Btw. i am pleased to see this kind of
>>> things work out as expected most of the time (addrtype checking etc. all
>>> in place). :)
>>>
>>
>> Well, I rethink of what "interface-local" means.
>>
>> It seems applications will join ff01::/16%eth0 instead of ff01::/16%lo.
>> If so, your original patch seems better. My bad, sorry.
>
> I was looking at getpeername et. al. where we should report the scope
> back to the user. A common pattern is:
>
> if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL)
> sin->sin6_scope_id = IP6CB(skb)->iif;
>
> I propose to introduce something like 'bool ipv6_addr_intf_scoped(in6_addr)'
> and let it check for ll addresses and interface scoped addresses.
Hmm, maybe, we might want to say:
__u32 __ipv6_iface_scope_id(int type, unsigned int iface)
{
if (type == IPV6_ADDR_ANY ||
type & IPV6_ADDR_LOOPBACK ||
__ipv6_addr_src_scope(type) > IPV6_ADDR_SCOPE_LINKLOCAL)
return 0;
return iface;
}
__u32 ipv6_iface_scope_id(const struct in6_addr *addr, unsigned int iface)
{
return __ipv6_iface_scope_id(__ipv6_addr_type(addr), iface);
}
And then,
sin->sin6_scope_id = __ipv6_iface_scope_id(__ipv6_addr_type(&sin->sin6_addr),
IP6CB(skb)->iif);
or
sin->sin6_scope_id = ipv6_iface_scope_id(&sin->sin6_addr, IP6CB(skb)->iif);
--yoshfuji
next prev parent reply other threads:[~2013-02-10 18:42 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-06 8:49 [IPv6] interface-local multicast escapes the local node Erik Hugne
2013-02-06 12:12 ` Hannes Frederic Sowa
2013-02-06 13:07 ` Erik Hugne
2013-02-06 13:49 ` Hannes Frederic Sowa
2013-02-06 15:06 ` Erik Hugne
2013-02-06 15:12 ` Hannes Frederic Sowa
2013-02-06 15:32 ` YOSHIFUJI Hideaki
2013-02-06 16:04 ` Hannes Frederic Sowa
2013-02-06 16:18 ` Eric Dumazet
2013-02-06 16:25 ` Hannes Frederic Sowa
2013-02-06 16:49 ` YOSHIFUJI Hideaki
2013-02-07 1:00 ` Hannes Frederic Sowa
2013-02-07 7:28 ` Erik Hugne
2013-02-07 15:41 ` YOSHIFUJI Hideaki
2013-02-06 15:24 ` YOSHIFUJI Hideaki
2013-02-06 16:54 ` Hannes Frederic Sowa
2013-02-09 12:10 ` Hannes Frederic Sowa
2013-02-09 14:12 ` YOSHIFUJI Hideaki
2013-02-09 23:08 ` Hannes Frederic Sowa
2013-02-10 9:59 ` Hannes Frederic Sowa
2013-02-10 10:57 ` YOSHIFUJI Hideaki
2013-02-10 15:32 ` Hannes Frederic Sowa
2013-02-10 18:42 ` YOSHIFUJI Hideaki [this message]
2013-02-10 18:49 ` Hannes Frederic Sowa
2013-02-11 11:13 ` [PATCH RFC 1/2] ipv6: introdcue __ipv6_addr_needs_scope_id and ipv6_iface_scope_id helper functions Hannes Frederic Sowa
2013-02-11 13:36 ` YOSHIFUJI Hideaki
2013-02-11 11:13 ` [PATCH RFC 2/2] ipv6: use newly introduced helper functions __ipv6_addr_needs_scope_id and ipv6_iface_scope_id Hannes Frederic Sowa
2013-02-09 15:50 ` [IPv6] interface-local multicast escapes the local node YOSHIFUJI Hideaki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5117EA2D.1020106@linux-ipv6.org \
--to=yoshfuji@linux-ipv6.org \
--cc=erik.hugne@ericsson.com \
--cc=hannes@stressinduktion.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).