igmp.c (4fb7253e4f9a8f06a986a3b317e2f79d9b43d552) igmp.c (ff06525fcb8ae3c302ac1319bf6c07c026dea964)
1/*
2 * Linux NET3: Internet Group Management Protocol [IGMP]
3 *
4 * This code implements the IGMP protocol as defined in RFC1112. There has
5 * been a further revision of this protocol since which is now supported.
6 *
7 * If you have trouble with this module be careful what gcc you have used,
8 * the older version didn't come out right using gcc 2.5.8, the newer one

--- 1293 unchanged lines hidden (view full) ---

1302#ifdef CONFIG_IP_MULTICAST
1303 if (im->multiaddr == IGMP_ALL_HOSTS)
1304 return;
1305 if (ipv4_is_local_multicast(im->multiaddr) && !net->ipv4.sysctl_igmp_llm_reports)
1306 return;
1307
1308 if (in_dev->dead)
1309 return;
1/*
2 * Linux NET3: Internet Group Management Protocol [IGMP]
3 *
4 * This code implements the IGMP protocol as defined in RFC1112. There has
5 * been a further revision of this protocol since which is now supported.
6 *
7 * If you have trouble with this module be careful what gcc you have used,
8 * the older version didn't come out right using gcc 2.5.8, the newer one

--- 1293 unchanged lines hidden (view full) ---

1302#ifdef CONFIG_IP_MULTICAST
1303 if (im->multiaddr == IGMP_ALL_HOSTS)
1304 return;
1305 if (ipv4_is_local_multicast(im->multiaddr) && !net->ipv4.sysctl_igmp_llm_reports)
1306 return;
1307
1308 if (in_dev->dead)
1309 return;
1310
1311 im->unsolicit_count = net->ipv4.sysctl_igmp_qrv;
1310 if (IGMP_V1_SEEN(in_dev) || IGMP_V2_SEEN(in_dev)) {
1311 spin_lock_bh(&im->lock);
1312 igmp_start_timer(im, IGMP_INITIAL_REPORT_DELAY);
1313 spin_unlock_bh(&im->lock);
1314 return;
1315 }
1316 /* else, v3 */
1317

--- 67 unchanged lines hidden (view full) ---

1385
1386/*
1387 * A socket has joined a multicast group on device dev.
1388 */
1389static void __ip_mc_inc_group(struct in_device *in_dev, __be32 addr,
1390 unsigned int mode)
1391{
1392 struct ip_mc_list *im;
1312 if (IGMP_V1_SEEN(in_dev) || IGMP_V2_SEEN(in_dev)) {
1313 spin_lock_bh(&im->lock);
1314 igmp_start_timer(im, IGMP_INITIAL_REPORT_DELAY);
1315 spin_unlock_bh(&im->lock);
1316 return;
1317 }
1318 /* else, v3 */
1319

--- 67 unchanged lines hidden (view full) ---

1387
1388/*
1389 * A socket has joined a multicast group on device dev.
1390 */
1391static void __ip_mc_inc_group(struct in_device *in_dev, __be32 addr,
1392 unsigned int mode)
1393{
1394 struct ip_mc_list *im;
1393#ifdef CONFIG_IP_MULTICAST
1394 struct net *net = dev_net(in_dev->dev);
1395#endif
1396
1397 ASSERT_RTNL();
1398
1399 for_each_pmc_rtnl(in_dev, im) {
1400 if (im->multiaddr == addr) {
1401 im->users++;
1402 ip_mc_add_src(in_dev, &addr, mode, 0, NULL, 0);
1403 goto out;

--- 10 unchanged lines hidden (view full) ---

1414 im->multiaddr = addr;
1415 /* initial mode is (EX, empty) */
1416 im->sfmode = mode;
1417 im->sfcount[mode] = 1;
1418 refcount_set(&im->refcnt, 1);
1419 spin_lock_init(&im->lock);
1420#ifdef CONFIG_IP_MULTICAST
1421 timer_setup(&im->timer, igmp_timer_expire, 0);
1395
1396 ASSERT_RTNL();
1397
1398 for_each_pmc_rtnl(in_dev, im) {
1399 if (im->multiaddr == addr) {
1400 im->users++;
1401 ip_mc_add_src(in_dev, &addr, mode, 0, NULL, 0);
1402 goto out;

--- 10 unchanged lines hidden (view full) ---

1413 im->multiaddr = addr;
1414 /* initial mode is (EX, empty) */
1415 im->sfmode = mode;
1416 im->sfcount[mode] = 1;
1417 refcount_set(&im->refcnt, 1);
1418 spin_lock_init(&im->lock);
1419#ifdef CONFIG_IP_MULTICAST
1420 timer_setup(&im->timer, igmp_timer_expire, 0);
1422 im->unsolicit_count = net->ipv4.sysctl_igmp_qrv;
1423#endif
1424
1425 im->next_rcu = in_dev->mc_list;
1426 in_dev->mc_count++;
1427 rcu_assign_pointer(in_dev->mc_list, im);
1428
1429 ip_mc_hash_add(in_dev, im);
1430

--- 1645 unchanged lines hidden ---
1421#endif
1422
1423 im->next_rcu = in_dev->mc_list;
1424 in_dev->mc_count++;
1425 rcu_assign_pointer(in_dev->mc_list, im);
1426
1427 ip_mc_hash_add(in_dev, im);
1428

--- 1645 unchanged lines hidden ---