bridge: prevent flooding IPv6 packets that do not have a listener
[deliverable/linux.git] / net / bridge / br_multicast.c
index 4accd0de6e8ed0a33c1fa9026630fe6b1ebcb247..5388955b2a3c4aec3423b463b630997cc4f06762 100644 (file)
@@ -1491,8 +1491,14 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
         *  - MLD has always Router Alert hop-by-hop option
         *  - But we do not support jumbrograms.
         */
-       if (ip6h->version != 6 ||
-           ip6h->nexthdr != IPPROTO_HOPOPTS ||
+       if (ip6h->version != 6)
+               return 0;
+
+       /* Prevent flooding this packet if there is no listener present */
+       if (ipv6_is_transient_multicast(&ip6h->daddr))
+               BR_INPUT_SKB_CB(skb)->mrouters_only = 1;
+
+       if (ip6h->nexthdr != IPPROTO_HOPOPTS ||
            ip6h->payload_len == 0)
                return 0;
 
This page took 0.024682 seconds and 5 git commands to generate.