openrc/net
William Hubbs 9127684553 Change the method for calculating the interface metric for linux systems
On linux systems running  >=linux-3.2, the /proc/net/dev file cannot be
relied on to show the order network interfaces were added to the system.
Also, there is currently a bug in the implementation of the seek call
for this file which can cause a system to go into an infinite loop.
This commit changes the _ifindex function to retreive the value of
/sys/class/net/${IFACE}/ifindex and use that value instead of attempting
to calculate one from the interface's position in /proc/net/dev.

reported-by: John Keeping <john.keeping@lineone.net>
X-Gentoo-Bug: 410127
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=410127
2012-04-01 22:59:00 -05:00
..
.gitignore Ignore more foo 2009-05-28 20:16:35 +01:00
adsl.sh drop useless "All rights reserved" notice 2011-06-29 19:46:31 -04:00
apipa.sh make shell math operations style more succulent 2011-11-19 02:25:36 -05:00
arping.sh make shell math operations style more succulent 2011-11-19 02:25:36 -05:00
bonding.sh Whitespace 2012-01-26 20:47:46 +01:00
br2684ctl.sh net: net.lo, lots of scripts 2012-01-08 16:24:10 -08:00
bridge.sh net: net.lo, lots of scripts 2012-01-08 16:24:10 -08:00
ccwgroup.sh drop useless "All rights reserved" notice 2011-06-29 19:46:31 -04:00
clip.sh make shell math operations style more succulent 2011-11-19 02:25:36 -05:00
dhclient.sh drop useless "All rights reserved" notice 2011-06-29 19:46:31 -04:00
dhcpcd.sh drop useless "All rights reserved" notice 2011-06-29 19:46:31 -04:00
ethtool.sh net/ethtool: Fix program call. 2012-01-16 09:33:09 -08:00
ifconfig.sh.BSD.in net/ifconfig, net/iproute2: admin/oper state check functions 2011-12-12 19:20:39 -08:00
ifconfig.sh.Linux.in Change the method for calculating the interface metric for linux systems 2012-04-01 22:59:00 -05:00
ifplugd.sh make shell math operations style more succulent 2011-11-19 02:25:36 -05:00
ifwatchd.sh drop useless "All rights reserved" notice 2011-06-29 19:46:31 -04:00
ip6rd.sh Whitespace. 2012-02-09 01:43:27 -08:00
ip6to4.sh net: net.lo, lots of scripts 2012-01-08 16:24:10 -08:00
ipppd.sh drop useless "All rights reserved" notice 2011-06-29 19:46:31 -04:00
iproute2.sh Change the method for calculating the interface metric for linux systems 2012-04-01 22:59:00 -05:00
iwconfig.sh.BSD.in make shell math operations style more succulent 2011-11-19 02:25:36 -05:00
iwconfig.sh.Linux.in make shell math operations style more succulent 2011-11-19 02:25:36 -05:00
macchanger.sh net: net.lo, lots of scripts 2012-01-08 16:24:10 -08:00
macnet.sh drop useless "All rights reserved" notice 2011-06-29 19:46:31 -04:00
macvlan.sh net: net.lo, lots of scripts 2012-01-08 16:24:10 -08:00
Makefile Use pattern rules instead of suffix rules 2011-10-29 09:43:24 -05:00
netplugd.sh make shell math operations style more succulent 2011-11-19 02:25:36 -05:00
pppd.sh make shell math operations style more succulent 2011-11-19 02:25:36 -05:00
pump.sh drop useless "All rights reserved" notice 2011-06-29 19:46:31 -04:00
ssidnet.sh drop useless "All rights reserved" notice 2011-06-29 19:46:31 -04:00
system.sh Fix typo 2011-11-23 08:17:33 -06:00
tuntap.sh net: net.lo, lots of scripts 2012-01-08 16:24:10 -08:00
udhcpc.sh drop useless "All rights reserved" notice 2011-06-29 19:46:31 -04:00
vlan.sh net: net.lo, lots of scripts 2012-01-08 16:24:10 -08:00
wpa_supplicant.sh make shell math operations style more succulent 2011-11-19 02:25:36 -05:00