update 2023-11-27 16:24:35
This commit is contained in:
parent
9a7466de1a
commit
6930dd8187
|
@ -193,6 +193,7 @@ natflow_qos_zone_setup_tc()
|
||||||
|
|
||||||
natflow_qos_clear_tc()
|
natflow_qos_clear_tc()
|
||||||
{
|
{
|
||||||
|
which tc &>/dev/null || return
|
||||||
ifconfig | grep "^[^ ]" | awk '{print $1}' | while read ifname; do
|
ifconfig | grep "^[^ ]" | awk '{print $1}' | while read ifname; do
|
||||||
if [ "${ifname}" = "${ifname//:}" ]; then
|
if [ "${ifname}" = "${ifname//:}" ]; then
|
||||||
tc qdisc del dev $ifname root &>/dev/null
|
tc qdisc del dev $ifname root &>/dev/null
|
||||||
|
@ -210,7 +211,7 @@ start() {
|
||||||
|
|
||||||
natflow_qos_clear_tc
|
natflow_qos_clear_tc
|
||||||
|
|
||||||
if [ "$(uci get natflow.main.tc_classid_mode 2>/dev/null || echo 0)" = "1" ]; then
|
if [ "$(uci get natflow.main.tc_classid_mode 2>/dev/null || echo 0)" = "1" ] && which tc &>/dev/null; then
|
||||||
echo tc_classid_mode=1 >/dev/qos_ctl
|
echo tc_classid_mode=1 >/dev/qos_ctl
|
||||||
config_foreach natflow_qos_zone_setup_tc zone
|
config_foreach natflow_qos_zone_setup_tc zone
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue