qos-scripts: add ifbN device before setting the link up

commit 50413e1ec8 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>
This commit is contained in:
Perry Melange 2021-04-19 11:17:10 +02:00 committed by Baptiste Jonglez
parent fcfa60408c
commit 23c3bab920
2 changed files with 3 additions and 2 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=qos-scripts PKG_NAME:=qos-scripts
PKG_VERSION:=1.3.1 PKG_VERSION:=1.3.1
PKG_RELEASE:=2 PKG_RELEASE:=$(AUTORELEASE)
PKG_LICENSE:=GPL-2.0 PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name> PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>

View File

@ -326,7 +326,8 @@ start_interface() {
append cstr "$classnr:$prio:$avgrate:$pktsize:$pktdelay:$maxrate:$qdisc:$filter" "$N" append cstr "$classnr:$prio:$avgrate:$pktsize:$pktdelay:$maxrate:$qdisc:$filter" "$N"
done done
append ${prefix}q "$(tcrules)" "$N" 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 del dev $dev root >&- 2>&-
tc qdisc add dev $dev root handle 1: hfsc default ${class_default}0 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" tc class add dev $dev parent 1: classid 1:1 hfsc sc rate ${rate}kbit ul rate ${rate}kbit"