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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 672e476c8c8a..f1d27f6c9351 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -1155,20 +1155,18 @@ static void igmp_group_dropped(struct ip_mc_list *im)
1155 1155
1156 if (!in_dev->dead) { 1156 if (!in_dev->dead) {
1157 if (IGMP_V1_SEEN(in_dev)) 1157 if (IGMP_V1_SEEN(in_dev))
1158 goto done; 1158 return;
1159 if (IGMP_V2_SEEN(in_dev)) { 1159 if (IGMP_V2_SEEN(in_dev)) {
1160 if (reporter) 1160 if (reporter)
1161 igmp_send_report(in_dev, im, IGMP_HOST_LEAVE_MESSAGE); 1161 igmp_send_report(in_dev, im, IGMP_HOST_LEAVE_MESSAGE);
1162 goto done; 1162 return;
1163 } 1163 }
1164 /* IGMPv3 */ 1164 /* IGMPv3 */
1165 igmpv3_add_delrec(in_dev, im); 1165 igmpv3_add_delrec(in_dev, im);
1166 1166
1167 igmp_ifc_event(in_dev); 1167 igmp_ifc_event(in_dev);
1168 } 1168 }
1169done:
1170#endif 1169#endif
1171 ip_mc_clear_src(im);
1172} 1170}
1173 1171
1174static void igmp_group_added(struct ip_mc_list *im) 1172static void igmp_group_added(struct ip_mc_list *im)
@@ -1305,6 +1303,7 @@ void ip_mc_dec_group(struct in_device *in_dev, __be32 addr)
1305 *ip = i->next_rcu; 1303 *ip = i->next_rcu;
1306 in_dev->mc_count--; 1304 in_dev->mc_count--;
1307 igmp_group_dropped(i); 1305 igmp_group_dropped(i);
1306 ip_mc_clear_src(i);
1308 1307
1309 if (!in_dev->dead) 1308 if (!in_dev->dead)
1310 ip_rt_multicast_event(in_dev); 1309 ip_rt_multicast_event(in_dev);
@@ -1414,7 +1413,8 @@ void ip_mc_destroy_dev(struct in_device *in_dev)
1414 in_dev->mc_list = i->next_rcu; 1413 in_dev->mc_list = i->next_rcu;
1415 in_dev->mc_count--; 1414 in_dev->mc_count--;
1416 1415
1417 igmp_group_dropped(i); 1416 /* We've dropped the groups in ip_mc_down already */
1417 ip_mc_clear_src(i);
1418 ip_ma_put(i); 1418 ip_ma_put(i);
1419 } 1419 }
1420} 1420}