Skip to content

Commit

Permalink
igmp: Avoid zero delay when receiving odd mixture of IGMP queries
Browse files Browse the repository at this point in the history
commit a8c1f65 upstream.

Commit 5b7c840 ('ipv4: correct IGMP
behavior on v3 query during v2-compatibility mode') added yet another
case for query parsing, which can result in max_delay = 0.  Substitute
a value of 1, as in the usual v3 case.

Reported-by: Simon McVittie <smcv@debian.org>
References: http://bugs.debian.org/654876
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
bwhacks authored and gregkh committed Jan 12, 2012
1 parent 8dccddb commit dd9f982
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/ipv4/igmp.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -875,6 +875,8 @@ static void igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb,
* to be intended in a v3 query. * to be intended in a v3 query.
*/ */
max_delay = IGMPV3_MRC(ih3->code)*(HZ/IGMP_TIMER_SCALE); max_delay = IGMPV3_MRC(ih3->code)*(HZ/IGMP_TIMER_SCALE);
if (!max_delay)
max_delay = 1; /* can't mod w/ 0 */
} else { /* v3 */ } else { /* v3 */
if (!pskb_may_pull(skb, sizeof(struct igmpv3_query))) if (!pskb_may_pull(skb, sizeof(struct igmpv3_query)))
return; return;
Expand Down

0 comments on commit dd9f982

Please sign in to comment.