fib_semantics.c (d7f6884ae0ae6e406ec3500fcde16e8f51642460) | fib_semantics.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: semantics. 7 * 8 * Version: $Id: fib_semantics.c,v 1.19 2002/01/12 07:54:56 davem Exp $ --- 1073 unchanged lines hidden (view full) --- 1082 if (colon) 1083 *colon = 0; 1084 dev = __dev_get_by_name(devname); 1085 if (!dev) 1086 return -ENODEV; 1087 rta->rta_oif = &dev->ifindex; 1088 if (colon) { 1089 struct in_ifaddr *ifa; | 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: semantics. 7 * 8 * Version: $Id: fib_semantics.c,v 1.19 2002/01/12 07:54:56 davem Exp $ --- 1073 unchanged lines hidden (view full) --- 1082 if (colon) 1083 *colon = 0; 1084 dev = __dev_get_by_name(devname); 1085 if (!dev) 1086 return -ENODEV; 1087 rta->rta_oif = &dev->ifindex; 1088 if (colon) { 1089 struct in_ifaddr *ifa; |
1090 struct in_device *in_dev = __in_dev_get(dev); | 1090 struct in_device *in_dev = __in_dev_get_rtnl(dev); |
1091 if (!in_dev) 1092 return -ENODEV; 1093 *colon = ':'; 1094 for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) 1095 if (strcmp(ifa->ifa_label, devname) == 0) 1096 break; 1097 if (ifa == NULL) 1098 return -ENODEV; --- 164 unchanged lines hidden (view full) --- 1263 alive = 0; 1264 change_nexthops(fi) { 1265 if (!(nh->nh_flags&RTNH_F_DEAD)) { 1266 alive++; 1267 continue; 1268 } 1269 if (nh->nh_dev == NULL || !(nh->nh_dev->flags&IFF_UP)) 1270 continue; | 1091 if (!in_dev) 1092 return -ENODEV; 1093 *colon = ':'; 1094 for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) 1095 if (strcmp(ifa->ifa_label, devname) == 0) 1096 break; 1097 if (ifa == NULL) 1098 return -ENODEV; --- 164 unchanged lines hidden (view full) --- 1263 alive = 0; 1264 change_nexthops(fi) { 1265 if (!(nh->nh_flags&RTNH_F_DEAD)) { 1266 alive++; 1267 continue; 1268 } 1269 if (nh->nh_dev == NULL || !(nh->nh_dev->flags&IFF_UP)) 1270 continue; |
1271 if (nh->nh_dev != dev || __in_dev_get(dev) == NULL) | 1271 if (nh->nh_dev != dev || !__in_dev_get_rtnl(dev)) |
1272 continue; 1273 alive++; 1274 spin_lock_bh(&fib_multipath_lock); 1275 nh->nh_power = 0; 1276 nh->nh_flags &= ~RTNH_F_DEAD; 1277 spin_unlock_bh(&fib_multipath_lock); 1278 } endfor_nexthops(fi) 1279 --- 61 unchanged lines hidden --- | 1272 continue; 1273 alive++; 1274 spin_lock_bh(&fib_multipath_lock); 1275 nh->nh_power = 0; 1276 nh->nh_flags &= ~RTNH_F_DEAD; 1277 spin_unlock_bh(&fib_multipath_lock); 1278 } endfor_nexthops(fi) 1279 --- 61 unchanged lines hidden --- |