qos-scripts: add ifbN device before setting the link up
authorPerry Melange <isprotejesvalkata@gmail.com>
Mon, 19 Apr 2021 09:17:10 +0000 (11:17 +0200)
committerBaptiste Jonglez <git@bitsofnetworks.org>
Mon, 21 Jun 2021 07:28:23 +0000 (09:28 +0200)
commit 50413e1ec83dedaea44558d5f37af5454156a46a replaced ifconfig
with ip.  In order to set a link state to up, the interface needs
to be added first.

Fixes: FS#3754
Signed-off-by: Perry Melange <isprotejesvalkata@gmail.com>
[Add Fixes tag]
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
(cherry picked from commit 23c3bab9209f984692f8206c0d97758ee223a26f)

package/network/config/qos-scripts/Makefile
package/network/config/qos-scripts/files/usr/lib/qos/generate.sh

index 7d282b2db56d66db106296be5ac97c6ef45f1dda..d6e7df1467013eb0f95afa536855ce9abaac85b2 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qos-scripts
 PKG_VERSION:=1.3.1
-PKG_RELEASE:=2
+PKG_RELEASE:=$(AUTORELEASE)
 PKG_LICENSE:=GPL-2.0
 
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
index 32f15581f843658a94e9f4cb45873ddbff976d55..62e7283633e08ef826654e0168233da1a839ca22 100755 (executable)
@@ -326,7 +326,8 @@ start_interface() {
                        append cstr "$classnr:$prio:$avgrate:$pktsize:$pktdelay:$maxrate:$qdisc:$filter" "$N"
                done
                append ${prefix}q "$(tcrules)" "$N"
-               export dev_${dir}="ip link set $dev up >&- 2>&-
+               export dev_${dir}="ip link add ${dev} type ifb >&- 2>&-
+ip link set $dev up >&- 2>&-
 tc qdisc del dev $dev root >&- 2>&-
 tc qdisc add dev $dev root handle 1: hfsc default ${class_default}0
 tc class add dev $dev parent 1: classid 1:1 hfsc sc rate ${rate}kbit ul rate ${rate}kbit"