Skip to content

Commit

Permalink
[IPV6] MCAST: Ensure to check multicast listener(s).
Browse files Browse the repository at this point in the history
In ip6_mc_input(), we need to check whether we have listener(s) for
the packet.

After commit ae7bf20, 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>
  • Loading branch information
YOSHIFUJI Hideaki authored and David S. Miller committed Apr 1, 2008
1 parent 9f09243 commit 4c7966b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/ipv6/ip6_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ int ip6_mc_input(struct sk_buff *skb)
IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INMCASTPKTS);

hdr = ipv6_hdr(skb);
deliver = unlikely(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI)) ||
ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL);
deliver = ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL);

/*
* IPv6 multicast router mode isnt currently supported.
Expand Down

0 comments on commit 4c7966b

Please sign in to comment.