netdev
[Top] [All Lists]

Re: Source Specific Query of MLDv2 [PATCH]

To: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
Subject: Re: Source Specific Query of MLDv2 [PATCH]
From: David Stevens <dlstevens@xxxxxxxxxx>
Date: Fri, 6 Feb 2004 20:39:47 -0800
Cc: davem@xxxxxxxxxx, hibi665@xxxxxxx, netdev@xxxxxxxxxxx, "Hideaki YOSHIFUJI" <yoshfuji@xxxxxxxxxxxxxxxxxxxxxxxxx>, yoshfuji@xxxxxxxxxxxxxx
In-reply-to: <20040207.132233.21960944.yoshfuji@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx

"Hideaki YOSHIFUJI" <yoshfuji@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote on 02/06/2004 08:22:33 PM:

> Why not in icmpv6_rcv()?

I don't understand this question. It's needed every place
*except* icmpv6_rcv().

> we need to do pskb_pull() before touching type/code.


Yes, you're right; I'll add that.

> >
> > -     hdr = skb->nh.ipv6h;
> > -     if (ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, &hdr->saddr))
> > -           deliver = 1;
> > -

> Please do not remove this.
> We need to check destination (but not source)
> because the driver may be in "promisc." mode.


I'm not removing it, I'm moving it. The original code
is:

ip6_mc_input()
<filter check> (not much else, since no mc router code)
ip6_input
<parse extension headers>
<deliver to ULP>

new is:
ip6_mc_input()
<inc stats, "#if 0" for mc router code>
ip6_input
<parse extension headers>
<filter check>
<deliver to ULP>

In promiscuous mode, it will parse the extension headers
for non-local multicasts before dropping them. But what
you suggested will do two multicast address look-ups for
every multicast packet (including the valid ones). One
for the destination and another for the destination/source
filter.
The point where it's filtered is just after the
checksum is validated, and no ICMP errors can be reported
for multicast destinations, so the trade-off is 1) a
performance hit for every multicast packet or 2) parsing
potential extension headers (expected case won't have any
and it doesn't cost anything) for multicast packets that
we may drop.
This patch implements option #2.

+-DLS

<Prev in Thread] Current Thread [Next in Thread>