Package: wireless-tools
Version: 30~pre9-12+b1

Error message on "ifup <iface>":
DHCPOFFER of 192.168.0.8 from 192.168.0.1 DHCPACK of 192.168.0.8 from
192.168.0.1 bound to 192.168.0.8 -- renewal in 610632848 seconds. /etc/network/if-pre-up.d/wireless-tools: 141: /etc/network/if-pre-up.d/wireless-tools: ifconfig: not found Error for wireless request "Set Power Management" (8B2C) : SET failed on device wlan0 ; Operation not permitted. Internet Systems Consortium DHCP Client 4.3.5 Copyright 2004-2016 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/

Steps to reproduce:
1. Setup a WiFi device, where the driver does not allow to apply all WiFi settings, before its interface is up. 2. Setup the system to use "wireless-tools" and "ifupdown" to bring up the interfaces.
3. Remove the package "net-tools"
4. Reboot and/or "ifup <iface>"

Result:
- As "/etc/network/if-pre-up.d/wireless-tools" fails, not all WiFi settings are applied.

Debugging:
- It is due to "ifconfig" being called within the if-pre-up.d script, if it fails to apply at least one WiFi setting. This seems to be a rare case, where WiFi drivers do not allow to apply settings, before the WiFi interface is up. But to handle this, is the purpose of the script. - This was no issue until and including Debian Wheezy, as the "ifupdown" package depended on "net-tools". But since Jessie, "ifupdown" depends on "iproute2" only, which replaces the nowadays as deprecated seen "net-tools".

Solutions:
1. Add "net-tools" to the dependency list of "wireless-tools". I do not recommend, as "net-tools" is seen as obsolete. Also, since "wireless-tools" does not depend on "ifupdown" and there are other methods to automate interface start (e.g. systemd-networkd, bypassing /etc/network/if-*), the dependency would not be always true. 2. Use "iproute2" commands to bring up the interface, since this is the direct replacement for "net-tools" and "ifupdown" itself is dependant for it.

Reference discussion:
- https://github.com/Fourdee/DietPi/issues/2070#issuecomment-421105192

Additions:
- We found this issue just by chance. The actual reason for applying the WiFi setting(s) failed, was a wrong entry, which then triggered the ifconfig call. - We never faced this issue before on "DietPi" (Debian based) distro, even that for a while "net-tools" is not pre-installed any more. So the cases where WiFi drivers do not allow to apply settings pre-up seem to be very rare and/or settings are applied afterwards by other WiFi related tools. - But I hope by having a look into the script, the issue is obvious enough to fixed, even that related errors cannot be replicated without special WiFi devices/drivers or simply wrong WiFi settings.

Best regards,

MichaIng

Reply via email to