fib_frontend.c (d7f6884ae0ae6e406ec3500fcde16e8f51642460) | fib_frontend.c (e5ed639913eea3e4783a550291775ab78dd84966) |
---|---|
1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * IPv4 Forwarding Information Base: FIB frontend. 7 * 8 * Version: $Id: fib_frontend.c,v 1.26 2001/10/31 21:55:54 davem Exp $ --- 159 unchanged lines hidden (view full) --- 168 .tos = tos } }, 169 .iif = oif }; 170 struct fib_result res; 171 int no_addr, rpf; 172 int ret; 173 174 no_addr = rpf = 0; 175 rcu_read_lock(); | 1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * IPv4 Forwarding Information Base: FIB frontend. 7 * 8 * Version: $Id: fib_frontend.c,v 1.26 2001/10/31 21:55:54 davem Exp $ --- 159 unchanged lines hidden (view full) --- 168 .tos = tos } }, 169 .iif = oif }; 170 struct fib_result res; 171 int no_addr, rpf; 172 int ret; 173 174 no_addr = rpf = 0; 175 rcu_read_lock(); |
176 in_dev = __in_dev_get(dev); | 176 in_dev = __in_dev_get_rcu(dev); |
177 if (in_dev) { 178 no_addr = in_dev->ifa_list == NULL; 179 rpf = IN_DEV_RPFILTER(in_dev); 180 } 181 rcu_read_unlock(); 182 183 if (in_dev == NULL) 184 goto e_inval; --- 417 unchanged lines hidden (view full) --- 602 break; 603 } 604 return NOTIFY_DONE; 605} 606 607static int fib_netdev_event(struct notifier_block *this, unsigned long event, void *ptr) 608{ 609 struct net_device *dev = ptr; | 177 if (in_dev) { 178 no_addr = in_dev->ifa_list == NULL; 179 rpf = IN_DEV_RPFILTER(in_dev); 180 } 181 rcu_read_unlock(); 182 183 if (in_dev == NULL) 184 goto e_inval; --- 417 unchanged lines hidden (view full) --- 602 break; 603 } 604 return NOTIFY_DONE; 605} 606 607static int fib_netdev_event(struct notifier_block *this, unsigned long event, void *ptr) 608{ 609 struct net_device *dev = ptr; |
610 struct in_device *in_dev = __in_dev_get(dev); | 610 struct in_device *in_dev = __in_dev_get_rtnl(dev); |
611 612 if (event == NETDEV_UNREGISTER) { 613 fib_disable_ip(dev, 2); 614 return NOTIFY_DONE; 615 } 616 617 if (!in_dev) 618 return NOTIFY_DONE; --- 46 unchanged lines hidden --- | 611 612 if (event == NETDEV_UNREGISTER) { 613 fib_disable_ip(dev, 2); 614 return NOTIFY_DONE; 615 } 616 617 if (!in_dev) 618 return NOTIFY_DONE; --- 46 unchanged lines hidden --- |