mcast.c (bba73071b6f71be0a101658d7c13866e30b264a6) | mcast.c (b75cc8f90f07342467b3bd51dbc0054f185032c9) |
---|---|
1/* 2 * Multicast support for IPv6 3 * Linux INET6 implementation 4 * 5 * Authors: 6 * Pedro Roque <roque@di.fc.ul.pt> 7 * 8 * Based on linux/ipv4/igmp.c and linux/ipv4/ip_sockglue.c --- 151 unchanged lines hidden (view full) --- 160 if (!mc_lst) 161 return -ENOMEM; 162 163 mc_lst->next = NULL; 164 mc_lst->addr = *addr; 165 166 if (ifindex == 0) { 167 struct rt6_info *rt; | 1/* 2 * Multicast support for IPv6 3 * Linux INET6 implementation 4 * 5 * Authors: 6 * Pedro Roque <roque@di.fc.ul.pt> 7 * 8 * Based on linux/ipv4/igmp.c and linux/ipv4/ip_sockglue.c --- 151 unchanged lines hidden (view full) --- 160 if (!mc_lst) 161 return -ENOMEM; 162 163 mc_lst->next = NULL; 164 mc_lst->addr = *addr; 165 166 if (ifindex == 0) { 167 struct rt6_info *rt; |
168 rt = rt6_lookup(net, addr, NULL, 0, 0); | 168 rt = rt6_lookup(net, addr, NULL, 0, NULL, 0); |
169 if (rt) { 170 dev = rt->dst.dev; 171 ip6_rt_put(rt); 172 } 173 } else 174 dev = __dev_get_by_index(net, ifindex); 175 176 if (!dev) { --- 72 unchanged lines hidden (view full) --- 249static struct inet6_dev *ip6_mc_find_dev_rcu(struct net *net, 250 const struct in6_addr *group, 251 int ifindex) 252{ 253 struct net_device *dev = NULL; 254 struct inet6_dev *idev = NULL; 255 256 if (ifindex == 0) { | 169 if (rt) { 170 dev = rt->dst.dev; 171 ip6_rt_put(rt); 172 } 173 } else 174 dev = __dev_get_by_index(net, ifindex); 175 176 if (!dev) { --- 72 unchanged lines hidden (view full) --- 249static struct inet6_dev *ip6_mc_find_dev_rcu(struct net *net, 250 const struct in6_addr *group, 251 int ifindex) 252{ 253 struct net_device *dev = NULL; 254 struct inet6_dev *idev = NULL; 255 256 if (ifindex == 0) { |
257 struct rt6_info *rt = rt6_lookup(net, group, NULL, 0, 0); | 257 struct rt6_info *rt = rt6_lookup(net, group, NULL, 0, NULL, 0); |
258 259 if (rt) { 260 dev = rt->dst.dev; 261 ip6_rt_put(rt); 262 } 263 } else 264 dev = dev_get_by_index_rcu(net, ifindex); 265 --- 2726 unchanged lines hidden (view full) --- 2992 inet_ctl_sock_destroy(net->ipv6.igmp_sk); 2993 inet_ctl_sock_destroy(net->ipv6.mc_autojoin_sk); 2994 igmp6_proc_exit(net); 2995} 2996 2997static struct pernet_operations igmp6_net_ops = { 2998 .init = igmp6_net_init, 2999 .exit = igmp6_net_exit, | 258 259 if (rt) { 260 dev = rt->dst.dev; 261 ip6_rt_put(rt); 262 } 263 } else 264 dev = dev_get_by_index_rcu(net, ifindex); 265 --- 2726 unchanged lines hidden (view full) --- 2992 inet_ctl_sock_destroy(net->ipv6.igmp_sk); 2993 inet_ctl_sock_destroy(net->ipv6.mc_autojoin_sk); 2994 igmp6_proc_exit(net); 2995} 2996 2997static struct pernet_operations igmp6_net_ops = { 2998 .init = igmp6_net_init, 2999 .exit = igmp6_net_exit, |
3000 .async = true, |
|
3000}; 3001 3002int __init igmp6_init(void) 3003{ 3004 return register_pernet_subsys(&igmp6_net_ops); 3005} 3006 3007int __init igmp6_late_init(void) --- 13 unchanged lines hidden --- | 3001}; 3002 3003int __init igmp6_init(void) 3004{ 3005 return register_pernet_subsys(&igmp6_net_ops); 3006} 3007 3008int __init igmp6_late_init(void) --- 13 unchanged lines hidden --- |