aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>2013-02-08 23:29:58 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-11 00:21:44 -0500
commitec16ef2228829698fdbd2f6b160ff52551a6bf8a (patch)
tree2dc5a8441691c824ea3c4fc185af78b0757d1609
parentf45a5c267da35174e22cec955093a7513dc1623d (diff)
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: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv6/mcast.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index e5de48551864..3a2849f660ca 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -661,6 +661,10 @@ static void igmp6_group_added(struct ifmcaddr6 *mc)
661 struct net_device *dev = mc->idev->dev; 661 struct net_device *dev = mc->idev->dev;
662 char buf[MAX_ADDR_LEN]; 662 char buf[MAX_ADDR_LEN];
663 663
664 if (IPV6_ADDR_MC_SCOPE(&mc->mca_addr) <
665 IPV6_ADDR_SCOPE_LINKLOCAL)
666 return;
667
664 spin_lock_bh(&mc->mca_lock); 668 spin_lock_bh(&mc->mca_lock);
665 if (!(mc->mca_flags&MAF_LOADED)) { 669 if (!(mc->mca_flags&MAF_LOADED)) {
666 mc->mca_flags |= MAF_LOADED; 670 mc->mca_flags |= MAF_LOADED;
@@ -687,6 +691,10 @@ static void igmp6_group_dropped(struct ifmcaddr6 *mc)
687 struct net_device *dev = mc->idev->dev; 691 struct net_device *dev = mc->idev->dev;
688 char buf[MAX_ADDR_LEN]; 692 char buf[MAX_ADDR_LEN];
689 693
694 if (IPV6_ADDR_MC_SCOPE(&mc->mca_addr) <
695 IPV6_ADDR_SCOPE_LINKLOCAL)
696 return;
697
690 spin_lock_bh(&mc->mca_lock); 698 spin_lock_bh(&mc->mca_lock);
691 if (mc->mca_flags&MAF_LOADED) { 699 if (mc->mca_flags&MAF_LOADED) {
692 mc->mca_flags &= ~MAF_LOADED; 700 mc->mca_flags &= ~MAF_LOADED;