Nft-qos not working anymore

Anyone else noticed that since the update in 21.02 that included a change when first loading the interfaces page, that nft-qos doesn't work anymore?

How can I debug this? Nothing has changed in my build apart from running git pull, and updating installing the feeds then running make.

New image works perfect but nft-qos has no effect despite being enabled.

fgrep 'ifname="$' /lib/nft-qos/*
/lib/nft-qos/priority.sh:				ifname="$(uci_get network.lan.ifname)"
/lib/nft-qos/priority.sh:			ifname="$(uci_get network.$priority_netdev.ifname)"

Hi @anon50098793

What's that command for? Do I need to run it via ssh and post the output?

  • 21.02 is in development
  • the issue you are experiencing is related to a bug

either

  • fix it locally
  • report it so it can be fixed for everyone ( thus the maintainer is aware and given the opportunity to participate )

Can it be fixed locally by someone with minimal skill... Or should I just revert to an older build for now.

How do I report it and where??

only minimal skill is required to report a bug...

  • your environment
  • your config
  • your symptoms

Ive looked but the bug reporting is a weird procedure... i will just have to revert to an older build and try again another time as im not savvy enough to do this stuff. Ive got an older working build saved luckily. ( Openwrt-21.02 SNAPSHOT r16068-4b89b90)

cheers for helping though.

Reported it in the end, but as of yet it's still broken even on master.

It was handy being able to limit bandwith to certain devices....

Isn’t this just a matter of replacing .ifname with .device on the script lines mentioned by @anon50098793?

1 Like

I've got no idea, that's far beyond my level of understanding... If you can give me a quick walkthrough I'll certainly give it a try?

I did see the command and asked what it was for, but got no reply.

BusyBox v1.33.1 (2021-07-08 05:38:41 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r17118-8f7e6db230
 -----------------------------------------------------
root@OpenWrt:~# fgrep 'ifname="$' /lib/nft-qos/*
/lib/nft-qos/priority.sh:                               ifname="$(uci_get network.lan.ifname)"
/lib/nft-qos/priority.sh:                       ifname="$(uci_get network.$priority_netdev.ifname)"
root@OpenWrt:~#
fgrep 'lan.type' /lib/nft-qos/*
core.sh:	local lt="$(uci_get "network.lan.type")"
priority.sh:		lan) [ "$(uci_get network.lan.type)" != "bridge" ] && {
sed -i 's|^NFT_QOS_HAS_BRIDGE=$|NFT_QOS_HAS_BRIDGE=y|g' /lib/nft-qos/core.sh
BusyBox v1.33.1 (2021-07-08 05:38:41 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r17118-8f7e6db230
 -----------------------------------------------------
root@OpenWrt:~# fgrep 'lan.type' /lib/nft-qos/*
/lib/nft-qos/core.sh:   local lt="$(uci_get "network.lan.type")"
/lib/nft-qos/priority.sh:               lan) [ "$(uci_get network.lan.type)" != "bridge" ] && {
root@OpenWrt:~#
BusyBox v1.33.1 (2021-07-08 05:38:41 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r17118-8f7e6db230
 -----------------------------------------------------
root@OpenWrt:~# fgrep 'lan.type' /lib/nft-qos/*
/lib/nft-qos/core.sh:   local lt="$(uci_get "network.lan.type")"
/lib/nft-qos/priority.sh:               lan) [ "$(uci_get network.lan.type)" != "bridge" ] && {
root@OpenWrt:~# core.sh:local lt="$(uci_get "network.lan.type")"
-ash: uci_get: not found
-ash: core.sh:local: not found
root@OpenWrt:~# priority.sh:lan) [ "$(uci_get network.lan.type)" != "bridge" ] && {
-ash: syntax error: unexpected ")"
root@OpenWrt:~#

Does that let you know what's going on @anon50098793 ?

No further updates on this?

Still no news, think the package life is over. Shame.

I'm looking for a fix for this as well. IP address limits work, but MAC limiting doesn't seem to work at all.

Ill post the fix if I find anything.

EDIT:
Wulfy's da man!

sed -i 's|^NFT_QOS_HAS_BRIDGE=$|NFT_QOS_HAS_BRIDGE=y|g' /lib/nft-qos/core.sh

Adds y at line 9 in core.sh and fixes all the issues, provided you don't have 
multiple entries for the same network device like I did...

Thanks!

2 Likes

What did you do to fix it??

Did you run that line of code via ssh terminal? Is it specific to his build?

Yes, run it via SSH terminal. As far as using in on a build other than wulfy's raspberry pi build, I haven't tried.

I only use limits based on MAC addresses. That line just makes a change in nft-qos core script that is downloaded when you install the nft-qos package (or 'luci-app-nft-qos' package that automatically installs nft-qos as a dependency).

Try deleting nft-qos config that can be found in /etc/config/nft-qos on the router filesystem if you can't get it to work. One thing to note, when I enabled traffic priority it breaks the 'QoS over Nftables' page in luci web UI, but since I don't use that anyway I haven't really spent time trying to figure out why. The fix for that is to delete that file, or edit it to turn off traffic priority options "priority_enable '0'"

Edit the file like this: 
nano /etc/config/nft-qos

delete it like this: 
rm  /etc/config/nft-qos
1 Like