aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_input.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-31 22:30:45 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-31 22:30:45 -0400
commit4c7966b86b910d6d4869aba1d7417d053ac9682c (patch)
treeec65994e682b6c3e05533ddd1bb15986687f8ea1 /net/ipv6/ip6_input.c
parent9f09243890a4e7d2e06d40b56f26a64f88c6ec8b (diff)
[IPV6] MCAST: Ensure to check multicast listener(s).
In ip6_mc_input(), we need to check whether we have listener(s) for the packet. After commit ae7bf20a6316272acfcaef5d265b18aaa54b41e4, all packets for multicast destinations are delivered to upper layer if IFF_PROMISC or IFF_ALLMULTI is set. In fact, bug was rather ancient; the original (before the commit) intent of the dev->flags check was to skip the ipv6_chk_mcast_addr() call, assuming L2 filters packets appropriately, but it was even not true. Let's explicitly check our multicast list. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Acked-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_input.c')
-rw-r--r--net/ipv6/ip6_input.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index 178aebc0427..98ab4f45990 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -239,8 +239,7 @@ int ip6_mc_input(struct sk_buff *skb)
239 IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INMCASTPKTS); 239 IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INMCASTPKTS);
240 240
241 hdr = ipv6_hdr(skb); 241 hdr = ipv6_hdr(skb);
242 deliver = unlikely(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI)) || 242 deliver = ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL);
243 ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL);
244 243
245 /* 244 /*
246 * IPv6 multicast router mode isnt currently supported. 245 * IPv6 multicast router mode isnt currently supported.