]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - net/ipv4/igmp.c
igmp: Avoid zero delay when receiving odd mixture of IGMP queries
[linux-2.6.git] / net / ipv4 / igmp.c
index fa057d105befea6e775c251f900b763929d4f572..5104bc0bbdbe73d43f0b92e659e7fb2dda24928f 100644 (file)
@@ -880,6 +880,8 @@ static void igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb,
                 * to be intended in a v3 query.
                 */
                max_delay = IGMPV3_MRC(ih3->code)*(HZ/IGMP_TIMER_SCALE);
+               if (!max_delay)
+                       max_delay = 1;  /* can't mod w/ 0 */
        } else { /* v3 */
                if (!pskb_may_pull(skb, sizeof(struct igmpv3_query)))
                        return;