diff options
Diffstat (limited to 'net/ipv4/igmp.c')
-rw-r--r-- | net/ipv4/igmp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 15db786d50ed..32a08bc010bf 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -219,9 +219,14 @@ static void igmp_start_timer(struct ip_mc_list *im, int max_delay) | |||
219 | static void igmp_gq_start_timer(struct in_device *in_dev) | 219 | static void igmp_gq_start_timer(struct in_device *in_dev) |
220 | { | 220 | { |
221 | int tv = prandom_u32() % in_dev->mr_maxdelay; | 221 | int tv = prandom_u32() % in_dev->mr_maxdelay; |
222 | unsigned long exp = jiffies + tv + 2; | ||
223 | |||
224 | if (in_dev->mr_gq_running && | ||
225 | time_after_eq(exp, (in_dev->mr_gq_timer).expires)) | ||
226 | return; | ||
222 | 227 | ||
223 | in_dev->mr_gq_running = 1; | 228 | in_dev->mr_gq_running = 1; |
224 | if (!mod_timer(&in_dev->mr_gq_timer, jiffies+tv+2)) | 229 | if (!mod_timer(&in_dev->mr_gq_timer, exp)) |
225 | in_dev_hold(in_dev); | 230 | in_dev_hold(in_dev); |
226 | } | 231 | } |
227 | 232 | ||