ipmr.c (d7f6884ae0ae6e406ec3500fcde16e8f51642460) | ipmr.c (e5ed639913eea3e4783a550291775ab78dd84966) |
---|---|
1/* 2 * IP multicast routing support for mrouted 3.6/3.8 3 * 4 * (c) 1995 Alan Cox, <alan@redhat.com> 5 * Linux Consultancy and Custom Driver Development 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 135 unchanged lines hidden (view full) --- 144 err = dev->do_ioctl(dev, &ifr, SIOCADDTUNNEL); 145 set_fs(oldfs); 146 147 dev = NULL; 148 149 if (err == 0 && (dev = __dev_get_by_name(p.name)) != NULL) { 150 dev->flags |= IFF_MULTICAST; 151 | 1/* 2 * IP multicast routing support for mrouted 3.6/3.8 3 * 4 * (c) 1995 Alan Cox, <alan@redhat.com> 5 * Linux Consultancy and Custom Driver Development 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 135 unchanged lines hidden (view full) --- 144 err = dev->do_ioctl(dev, &ifr, SIOCADDTUNNEL); 145 set_fs(oldfs); 146 147 dev = NULL; 148 149 if (err == 0 && (dev = __dev_get_by_name(p.name)) != NULL) { 150 dev->flags |= IFF_MULTICAST; 151 |
152 in_dev = __in_dev_get(dev); | 152 in_dev = __in_dev_get_rtnl(dev); |
153 if (in_dev == NULL && (in_dev = inetdev_init(dev)) == NULL) 154 goto failure; 155 in_dev->cnf.rp_filter = 0; 156 157 if (dev_open(dev)) 158 goto failure; 159 } 160 } --- 112 unchanged lines hidden (view full) --- 273 } 274 maxvif = tmp+1; 275 } 276 277 write_unlock_bh(&mrt_lock); 278 279 dev_set_allmulti(dev, -1); 280 | 153 if (in_dev == NULL && (in_dev = inetdev_init(dev)) == NULL) 154 goto failure; 155 in_dev->cnf.rp_filter = 0; 156 157 if (dev_open(dev)) 158 goto failure; 159 } 160 } --- 112 unchanged lines hidden (view full) --- 273 } 274 maxvif = tmp+1; 275 } 276 277 write_unlock_bh(&mrt_lock); 278 279 dev_set_allmulti(dev, -1); 280 |
281 if ((in_dev = __in_dev_get(dev)) != NULL) { | 281 if ((in_dev = __in_dev_get_rtnl(dev)) != NULL) { |
282 in_dev->cnf.mc_forwarding--; 283 ip_rt_multicast_event(in_dev); 284 } 285 286 if (v->flags&(VIFF_TUNNEL|VIFF_REGISTER)) 287 unregister_netdevice(dev); 288 289 dev_put(dev); --- 126 unchanged lines hidden (view full) --- 416 if (!dev) 417 return -EADDRNOTAVAIL; 418 __dev_put(dev); 419 break; 420 default: 421 return -EINVAL; 422 } 423 | 282 in_dev->cnf.mc_forwarding--; 283 ip_rt_multicast_event(in_dev); 284 } 285 286 if (v->flags&(VIFF_TUNNEL|VIFF_REGISTER)) 287 unregister_netdevice(dev); 288 289 dev_put(dev); --- 126 unchanged lines hidden (view full) --- 416 if (!dev) 417 return -EADDRNOTAVAIL; 418 __dev_put(dev); 419 break; 420 default: 421 return -EINVAL; 422 } 423 |
424 if ((in_dev = __in_dev_get(dev)) == NULL) | 424 if ((in_dev = __in_dev_get_rtnl(dev)) == NULL) |
425 return -EADDRNOTAVAIL; 426 in_dev->cnf.mc_forwarding++; 427 dev_set_allmulti(dev, +1); 428 ip_rt_multicast_event(in_dev); 429 430 /* 431 * Fill in the VIF structures 432 */ --- 1475 unchanged lines hidden --- | 425 return -EADDRNOTAVAIL; 426 in_dev->cnf.mc_forwarding++; 427 dev_set_allmulti(dev, +1); 428 ip_rt_multicast_event(in_dev); 429 430 /* 431 * Fill in the VIF structures 432 */ --- 1475 unchanged lines hidden --- |