tohojo / sqm-scripts

SQM scripts traffic shaper
http://www.bufferbloat.net/projects/cerowrt/wiki/Smart_Queue_Management
234 stars 64 forks source link

Device name overwritten when config changed in LuCI and device is down #124

Closed aaronjg closed 3 years ago

aaronjg commented 4 years ago

The LuCI web app provides a dropdown list of devices that are currently up in the system. If you had previously set a device that is no longer up and try to update any of the config options, the device will be overwritten from one in the list.

Rather than specifying the device, it would be better to specify the interface, and then lookup the device and check if it is up with something like.

network_get_device dev $1
network_is_up $1 && {
    ...
}

LuCI also provides the widgets.NetworkSelect widget that can be used to create the dropdown menu.

tohojo commented 3 years ago

Is this still valid with the new reworked (client-side) LUCI? If so, please re-open an issue against the OpenWrt LUCI repository at https://github.com/openwrt/luci/ since luci-app-sqm has moved there...