lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <51394A9F.8000003@linux-ipv6.org>
Date:	Fri, 08 Mar 2013 11:19:11 +0900
From:	YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
To:	netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
	Hannes Frederic Sowa <hannes@...essinduktion.org>
CC:	YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
Subject: Re: [PATCH net-next v3 3/4] ipv6: stop multicast forwarding to process
 interface scoped addresses

Hannes Frederic Sowa wrote:
> v2:
> a) used struct ipv6_addr_props
> 
> v3:
> a) reverted changes for ipv6_addr_props
> 
> Cc: YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
> Signed-off-by: Hannes Frederic Sowa <hannes@...essinduktion.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ