Commit ec16ef22 authored by YOSHIFUJI Hideaki / 吉藤英明's avatar YOSHIFUJI Hideaki / 吉藤英明 Committed by David S. Miller

ipv6 mcast: Do not join device multicast for interface-local multicasts.

RFC4291 (IPv6 addressing architecture) says that interface-Local scope
spans only a single interface on a node.  We should not join L2 device
multicast list for addresses in interface-local (or smaller) scope.
Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f45a5c26
...@@ -661,6 +661,10 @@ static void igmp6_group_added(struct ifmcaddr6 *mc) ...@@ -661,6 +661,10 @@ static void igmp6_group_added(struct ifmcaddr6 *mc)
struct net_device *dev = mc->idev->dev; struct net_device *dev = mc->idev->dev;
char buf[MAX_ADDR_LEN]; char buf[MAX_ADDR_LEN];
if (IPV6_ADDR_MC_SCOPE(&mc->mca_addr) <
IPV6_ADDR_SCOPE_LINKLOCAL)
return;
spin_lock_bh(&mc->mca_lock); spin_lock_bh(&mc->mca_lock);
if (!(mc->mca_flags&MAF_LOADED)) { if (!(mc->mca_flags&MAF_LOADED)) {
mc->mca_flags |= MAF_LOADED; mc->mca_flags |= MAF_LOADED;
...@@ -687,6 +691,10 @@ static void igmp6_group_dropped(struct ifmcaddr6 *mc) ...@@ -687,6 +691,10 @@ static void igmp6_group_dropped(struct ifmcaddr6 *mc)
struct net_device *dev = mc->idev->dev; struct net_device *dev = mc->idev->dev;
char buf[MAX_ADDR_LEN]; char buf[MAX_ADDR_LEN];
if (IPV6_ADDR_MC_SCOPE(&mc->mca_addr) <
IPV6_ADDR_SCOPE_LINKLOCAL)
return;
spin_lock_bh(&mc->mca_lock); spin_lock_bh(&mc->mca_lock);
if (mc->mca_flags&MAF_LOADED) { if (mc->mca_flags&MAF_LOADED) {
mc->mca_flags &= ~MAF_LOADED; mc->mca_flags &= ~MAF_LOADED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment