[OpenWrt-Devel] [LEDE-DEV] [PATCH] netifd: remove wireless device when device fails to setup

Luke McKee hojuruku at gmail.com
Wed Jul 6 22:42:23 EDT 2016


The I think said patch would break scripts that see what devices are
available as in CONFIGURED, and set up procd triggers to reload when
the device is fixed or comes back online and gets given an IP address.

If DFS pulls down a wifi then it should change ubus interface state to
down, not remove the whole interface from ubus.

E.g. the mini_upnpd script I wrote or sysntpd script from busybox.
https://github.com/hojuruku/openwrt-packages/blob/mini_snmpd/net/mini_snmpd/files/mini_snmpd.init
https://lists.openwrt.org/pipermail/openwrt-devel/2016-July/041930.html

Many init scripts may need to be rewritten if this patch is accepted,
to use uci instead of ubus / jsonfilter (used by default for network_
functions now too in /lib/functions which means 95% of all init
scripts) to see if an interface is CONFIGURED - not up.


On 2016-07-01 11:50, Eduardo Abinader wrote:
> Hi Felix,
>
> 1) Just set a non-allowed DFS channel for DE, for instance.
> 2) Enable wireless; it fails
> 3) Change to a valid channel; the wdev is not set up.
>
> There is also a leftover on /etc/init.d/network reload.
> I think it should call /sbin/wifi instead of /sbin/wifi reload.
No, it should not. /sbin/wifi restarts wireless unconditionally, whereas
wifi reload only restarts if the configuration changed.

I understand the issue now, but in my opinion this fix is not correct.
It eliminates the state of the wireless device entirely, thus not giving
the user the chance to see that netifd failed to bring it up.

I think the main issue is the handling of the autostart flag and its
multiple uses. It gets used to prevent auto-restart after error, but it
is also used to indicate that the user wanted to shut down the wireless
interface. I think for the error case we need to leave autostart alone
and use a separate flag (which gets cleared if the configuration gets
updated).

That way the state would be preserved and a restart would be triggered
on actual config changes.

- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list