netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
To: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Subject: Re: [PATCH net-next v3 3/4] ipv6: stop multicast forwarding to process interface scoped addresses
Date: Fri, 08 Mar 2013 11:19:11 +0900	[thread overview]
Message-ID: <51394A9F.8000003@linux-ipv6.org> (raw)
In-Reply-To: <20130307210537.GA23729@order.stressinduktion.org>

Hannes Frederic Sowa wrote:
> v2:
> a) used struct ipv6_addr_props
> 
> v3:
> a) reverted changes for ipv6_addr_props
> 
> Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
> ---
>  net/ipv6/ip6_input.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
> index b1876e5..b73bcc2 100644
> --- a/net/ipv6/ip6_input.c
> +++ b/net/ipv6/ip6_input.c
> @@ -281,7 +281,7 @@ int ip6_mc_input(struct sk_buff *skb)
>  	 *      IPv6 multicast router mode is now supported ;)
>  	 */
>  	if (dev_net(skb->dev)->ipv6.devconf_all->mc_forwarding &&
> -	    !(ipv6_addr_type(&hdr->daddr) & IPV6_ADDR_LINKLOCAL) &&
> +	    !__ipv6_addr_needs_scope_id((ipv6_addr_type(&hdr->daddr))) &&
>  	    likely(!(IP6CB(skb)->flags & IP6SKB_FORWARDED))) {
>  		/*
>  		 * Okay, we try to forward - split and duplicate
> 

Well, I think __ipv6_addr_needs_scope_id() should be used just for
filling "sin6_scope_id", not for forwarding decision.

Since we always have multicast address, so 
            !(ipv6_addr_type(&hdr->daddr) & (IPV6_ADDR_LOOPBACK|IPV6_ADDR_LINKLOCAL))
is just fine for disallow "forwarding" multicast for interface-local addresses.

--yoshfuji

      reply	other threads:[~2013-03-08  2:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-07 21:05 [PATCH net-next v3 3/4] ipv6: stop multicast forwarding to process interface scoped addresses Hannes Frederic Sowa
2013-03-08  2:19 ` YOSHIFUJI Hideaki [this message]

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=51394A9F.8000003@linux-ipv6.org \
    --to=yoshfuji@linux-ipv6.org \
    --cc=davem@davemloft.net \
    --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).