]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ipv6: Make MLD packets to only be processed locally
authorAngga <Hermin.Anggawijaya@alliedtelesis.co.nz>
Fri, 3 Jul 2015 02:40:52 +0000 (14:40 +1200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Jul 2015 16:52:38 +0000 (09:52 -0700)
Before commit 7ab8bc899fd5 ("ipv6: Make ipv6_is_mld() inline and use it
from ip6_mc_input().") MLD packets were only processed locally. After the
change, a copy of MLD packet goes through ip6_mr_input, causing
MRT6MSG_NOCACHE message to be generated to user space.

Make MLD packet only processed locally.

Fixes: 7ab8bc899fd5 ("ipv6: Make ipv6_is_mld() inline and use it from ip6_mc_input().")
Signed-off-by: Hermin Anggawijaya <hermin.anggawijaya@alliedtelesis.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_input.c

index f2e464eba5efdb7b2a8abe3c2cecedae473777e7..57990c929cd8156ebac52c648deb50fd3f74ab82 100644 (file)
@@ -331,10 +331,10 @@ int ip6_mc_input(struct sk_buff *skb)
                                if (offset < 0)
                                        goto out;
 
-                               if (!ipv6_is_mld(skb, nexthdr, offset))
-                                       goto out;
+                               if (ipv6_is_mld(skb, nexthdr, offset))
+                                       deliver = true;
 
-                               deliver = true;
+                               goto out;
                        }
                        /* unknown RA - process it normally */
                }