]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/ipv4/raw.c
Merge tag 'please-pull-getrandom' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / net / ipv4 / raw.c
index 2054d7136c62c8afce519dfb5b5799397b062764..739db3100c2375ebd5113c4224b20423a585cc12 100644 (file)
@@ -58,6 +58,7 @@
 #include <linux/in_route.h>
 #include <linux/route.h>
 #include <linux/skbuff.h>
+#include <linux/igmp.h>
 #include <net/net_namespace.h>
 #include <net/dst.h>
 #include <net/sock.h>
@@ -174,7 +175,9 @@ static int raw_v4_input(struct sk_buff *skb, const struct iphdr *iph, int hash)
 
        while (sk) {
                delivered = 1;
-               if (iph->protocol != IPPROTO_ICMP || !icmp_filter(sk, skb)) {
+               if ((iph->protocol != IPPROTO_ICMP || !icmp_filter(sk, skb)) &&
+                   ip_mc_sf_allow(sk, iph->daddr, iph->saddr,
+                                  skb->dev->ifindex)) {
                        struct sk_buff *clone = skb_clone(skb, GFP_ATOMIC);
 
                        /* Not releasing hash table! */