aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/igmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/igmp.c')
-rw-r--r--net/ipv4/igmp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index cf75f8944b05..4da39446da2d 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -820,10 +820,9 @@ static void igmp_timer_expire(struct timer_list *t)
820 spin_lock(&im->lock); 820 spin_lock(&im->lock);
821 im->tm_running = 0; 821 im->tm_running = 0;
822 822
823 if (im->unsolicit_count) { 823 if (im->unsolicit_count && --im->unsolicit_count)
824 im->unsolicit_count--;
825 igmp_start_timer(im, unsolicited_report_interval(in_dev)); 824 igmp_start_timer(im, unsolicited_report_interval(in_dev));
826 } 825
827 im->reporter = 1; 826 im->reporter = 1;
828 spin_unlock(&im->lock); 827 spin_unlock(&im->lock);
829 828
@@ -1308,6 +1307,8 @@ static void igmp_group_added(struct ip_mc_list *im)
1308 1307
1309 if (in_dev->dead) 1308 if (in_dev->dead)
1310 return; 1309 return;
1310
1311 im->unsolicit_count = net->ipv4.sysctl_igmp_qrv;
1311 if (IGMP_V1_SEEN(in_dev) || IGMP_V2_SEEN(in_dev)) { 1312 if (IGMP_V1_SEEN(in_dev) || IGMP_V2_SEEN(in_dev)) {
1312 spin_lock_bh(&im->lock); 1313 spin_lock_bh(&im->lock);
1313 igmp_start_timer(im, IGMP_INITIAL_REPORT_DELAY); 1314 igmp_start_timer(im, IGMP_INITIAL_REPORT_DELAY);
@@ -1391,9 +1392,6 @@ static void __ip_mc_inc_group(struct in_device *in_dev, __be32 addr,
1391 unsigned int mode) 1392 unsigned int mode)
1392{ 1393{
1393 struct ip_mc_list *im; 1394 struct ip_mc_list *im;
1394#ifdef CONFIG_IP_MULTICAST
1395 struct net *net = dev_net(in_dev->dev);
1396#endif
1397 1395
1398 ASSERT_RTNL(); 1396 ASSERT_RTNL();
1399 1397
@@ -1420,7 +1418,6 @@ static void __ip_mc_inc_group(struct in_device *in_dev, __be32 addr,
1420 spin_lock_init(&im->lock); 1418 spin_lock_init(&im->lock);
1421#ifdef CONFIG_IP_MULTICAST 1419#ifdef CONFIG_IP_MULTICAST
1422 timer_setup(&im->timer, igmp_timer_expire, 0); 1420 timer_setup(&im->timer, igmp_timer_expire, 0);
1423 im->unsolicit_count = net->ipv4.sysctl_igmp_qrv;
1424#endif 1421#endif
1425 1422
1426 im->next_rcu = in_dev->mc_list; 1423 im->next_rcu = in_dev->mc_list;