openwrt / packages

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

sqm-scripts: not auto starting #25172

Open uski opened 1 month ago

uski commented 1 month 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 1 month ago

@tohojo

uski commented 1 month 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 1 month ago

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

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

tohojo commented 1 month ago

Could you please post the contents of your /etc/config/sqm ?