NetworkManager/src/devices
Thomas Haller 3641178508 platform: lookup ifname for ethtool/mii ioctl immediately before use
The ioctl APIs ethtool/mii require an interface ifname. That is inherrently
racy as interfaces can be renamed. This cannot be fixed, we can only
minimize the time between verifying the ifname and calling ioctl.

We already had problems with that when ethtool would access an interface
by name that didn't exists. See commit ab41c13b06 .
Checking for an existing interface only helps avoiding races when an interface
gets deleted. It does not help against renaming.

Go one step further, and instead of checking whether such an ifname
exists, try to get the ifname based on the ifindex immediately before
we need it.

This brings an additional overhead for each ethtool access.
2016-12-13 11:26:59 +01:00
..
adsl all: use O_CLOEXEC for file descriptors 2016-12-13 11:26:59 +01:00
bluetooth all: use O_CLOEXEC for file descriptors 2016-12-13 11:26:59 +01:00
team all: rename the introspection data to use the interface paths in names 2016-11-23 15:43:42 +01:00
tests all: use O_CLOEXEC for file descriptors 2016-12-13 11:26:59 +01:00
wifi all: rename the introspection data to use the interface paths in names 2016-11-23 15:43:42 +01:00
wwan all: use O_CLOEXEC for file descriptors 2016-12-13 11:26:59 +01:00
nm-arping-manager.c build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
nm-arping-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-bond.c all: rename the introspection data to use the interface paths in names 2016-11-23 15:43:42 +01:00
nm-device-bond.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-bridge.c all: rename the introspection data to use the interface paths in names 2016-11-23 15:43:42 +01:00
nm-device-bridge.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-ethernet-utils.c device: use NMSettings directly instead of NMConnectionProvider in subclasses 2016-05-24 12:35:58 +02:00
nm-device-ethernet-utils.h device: use NMSettings directly instead of NMConnectionProvider in subclasses 2016-05-24 12:35:58 +02:00
nm-device-ethernet.c platform: lookup ifname for ethtool/mii ioctl immediately before use 2016-12-13 11:26:59 +01:00
nm-device-ethernet.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-factory.c core: move plugin path reading function to nm-core-utils.c 2016-12-06 11:08:11 +01:00
nm-device-factory.h device: drop factory-no-default global arrays 2016-11-13 15:06:57 +01:00
nm-device-generic.c all: rename the introspection data to use the interface paths in names 2016-11-23 15:43:42 +01:00
nm-device-generic.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-infiniband.c core: use nmp_utils_sysctl_open_netdir() to set infiniband sysctl 2016-12-13 11:26:58 +01:00
nm-device-infiniband.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-ip-tunnel.c all: rename the introspection data to use the interface paths in names 2016-11-23 15:43:42 +01:00
nm-device-ip-tunnel.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-logging.h all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
nm-device-macvlan.c all: rename the introspection data to use the interface paths in names 2016-11-23 15:43:42 +01:00
nm-device-macvlan.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-private.h device: add @set_permanent argument to nm_device_hw_addr_set() 2016-11-07 14:06:44 +01:00
nm-device-tun.c core: use nmp_utils_sysctl_open_netdir() to read tun/tap sysctl 2016-12-13 11:26:59 +01:00
nm-device-tun.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-veth.c all: rename the introspection data to use the interface paths in names 2016-11-23 15:43:42 +01:00
nm-device-veth.h all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
nm-device-vlan.c all: rename the introspection data to use the interface paths in names 2016-11-23 15:43:42 +01:00
nm-device-vlan.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-vxlan.c all: rename the introspection data to use the interface paths in names 2016-11-23 15:43:42 +01:00
nm-device-vxlan.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device.c platform: add optional dirfd argument to sysctl functions 2016-12-13 11:26:58 +01:00
nm-device.h device: add IPv6 configuration delegation machinery 2016-11-09 17:23:32 +01:00
nm-lldp-listener.c build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
nm-lldp-listener.h core: refactor private data for NMExportedObject and others 2016-10-03 12:04:14 +02:00