openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
3.98k stars 3.47k forks source link

sqm-scripts: not auto starting #25172

Open uski opened 3 hours ago

uski commented 3 hours ago

Maintainer: @\tohojo Environment: r24106-10cc5fcd00, 23.05.5, mediatek/filogic, GL.iNet GL-MT3000

Description:

After configuring sqm-scripts using luci-app-sqm, sqm works immediately. However, after rebooting, sqm policies are no longer enforce and bandwidth is unlimited. Running /etc/init.d/sqm start immediately restores the sqm policies.

Additionally, when setting the sqm loglevel to trace, the sqm logs are only visible when ran manually. There is no trace of sqm operation at boot time. This further supports that sqm is not auto-starting.

uski commented 3 hours ago

@tohojo

uski commented 3 hours ago

One noteworthy information is that in my setup, sqm is configured to operate only on a sub-interface (phy0-ap1). It is possible that there is a race condition at boot where sqm does not see this interface and does not execute, because the interface may take some time to be brought up at boot time. This is purely a conjecture however.

uski commented 3 hours ago

Adding the following to /etc/rc.local is a workaround that works for me:

sh -c 'sleep 15 && /etc/init.d/sqm start' &