From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
To: 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: Thu, 07 Feb 2013 01:49:09 +0900 [thread overview]
Message-ID: <51128985.2010701@linux-ipv6.org> (raw)
In-Reply-To: <20130206160409.GB18040@order.stressinduktion.org>
(2013年02月07日 01:04), Hannes Frederic Sowa wrote:
> On Thu, Feb 07, 2013 at 12:32:17AM +0900, YOSHIFUJI Hideaki wrote:
>> Hannes Frederic Sowa wrote:
>>> On Wed, Feb 06, 2013 at 02:07:39PM +0100, Erik Hugne wrote:
>>>> On Wed, Feb 06, 2013 at 01:12:48PM +0100, Hannes Frederic Sowa wrote:
>>>>> Fixing the output path should be relatively straightforward, please test
>>>>> the following patch.
>>>>
>>>> Tested OK.
>>>>
>>>>> Looking at the input path, I think there is also no input protection
>>>>> for ff01::/16 addresses from the wire if you bind such an address.
>>>>
>>>> Yes, this needs to be filtered on the input side aswell.
>>>
>>> This patch should do the trick. Perhaps you could also take it for a test
>>> drive? Thanks!
>>>
>>> [PATCH net-next] ipv6: don't accept node local multicast traffic from the wire
>>>
>>> Cc: Erik Hugne <erik.hugne@ericsson.com>
>>> Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
>>> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
>>> ---
>>> net/ipv6/ip6_input.c | 10 ++++++++++
>>> 1 file changed, 10 insertions(+)
>>>
>>> diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
>>> index 4ac5bf3..a2f71d2 100644
>>> --- a/net/ipv6/ip6_input.c
>>> +++ b/net/ipv6/ip6_input.c
>>> @@ -126,6 +126,16 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
>>> if (ipv6_addr_is_multicast(&hdr->saddr))
>>> goto err;
>>>
>>> + /*
>>> + * RFC4291 2.7
>>> + * Interface-Local scope spans only a single interface on a node
>>> + * and is useful only for loopback transmission of multicast.
>>> + */
>>> + if (ipv6_addr_is_multicast(&hdr->daddr) &&
>>> + IPV6_ADDR_MC_SCOPE(&hdr->daddr) <= IPV6_ADDR_SCOPE_NODELOCAL &&
>>> + skb->pkt_type != PACKET_LOOPBACK)
>>> + goto err;
>>> +
>>> skb->transport_header = skb->network_header + sizeof(*hdr);
>>> IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr);
>>
>> NAK.
>>
>> Well, do you have relevant RFC?
>> RFC4291 says that we should drop ff00::/16, but not ff01::/16.
>
> I know what you mean, the RFC does not state it directly. Hm, the BSDs seem to
> drop such destination addresses, too, if they don't originate from a loopback
> interface. Or did you mean that there is a flaw in the skb->pkt_type !=
> PACKET_LOOPBACK condition?
We do not drop ff01::/16, because RFC is silent about it.
--yoshfuji
next prev parent reply other threads:[~2013-02-06 16:49 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 [this message]
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
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=51128985.2010701@linux-ipv6.org \
--to=yoshfuji@linux-ipv6.org \
--cc=erik.hugne@ericsson.com \
--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).