X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=net%2Fipv4%2Figmp.c;h=5b15459955f84cfc26dd2b12f129b1ee4014e62b;hb=282d0a35c8c42c3ac4dd86a7e408ed1b30db4897;hp=15db786d50ed28c7d31855a9582ab111752b3641;hpb=c44ef859ceff45db1c72f9ccbfae96843c4b1501;p=karo-tx-linux.git diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 15db786d50ed..5b15459955f8 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -72,7 +72,7 @@ #include #include -#include +#include #include #include #include @@ -219,9 +219,14 @@ static void igmp_start_timer(struct ip_mc_list *im, int max_delay) static void igmp_gq_start_timer(struct in_device *in_dev) { int tv = prandom_u32() % in_dev->mr_maxdelay; + unsigned long exp = jiffies + tv + 2; + + if (in_dev->mr_gq_running && + time_after_eq(exp, (in_dev->mr_gq_timer).expires)) + return; in_dev->mr_gq_running = 1; - if (!mod_timer(&in_dev->mr_gq_timer, jiffies+tv+2)) + if (!mod_timer(&in_dev->mr_gq_timer, exp)) in_dev_hold(in_dev); }