mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-17 05:53:03 +08:00
🗽 Sync 2026-11-11 15:31:38
This commit is contained in:
1 parent
da9e4bea36
commit
2e3c0a9b33
189 files changed
+29797
-10433
No files matched your search
@@ -4,8 +4,8 @@
|
||||
# Remove qosify qdiscs and ifb devices left behind after qosify exits.
|
||||
#
|
||||
# A clean stop only does part of this: interface_clear_qdisc() removes the root
|
||||
# qdisc, the bpf filters and the ifb device but not clsact, and main() never
|
||||
# calls qosify_dns_stop(), so ifb-dns stays up. A crash, a SIGKILL or a respawn
|
||||
# qdisc, the bpf filters and the ifb device but not clsact, and before 16c95b0
|
||||
# main() never called qosify_dns_stop(), so ifb-dns stays up. A crash, a SIGKILL or a respawn
|
||||
# loop leaves the rest too. This script deliberately only touches the devices of
|
||||
# enabled qosify sections, the ifb names qosify derives from them and qosify's
|
||||
# own ifb-dns -- never a qdisc or ifb qosify did not create.
|
||||
@@ -32,11 +32,12 @@ exec 9>"$LOCK"
|
||||
command -v flock >/dev/null && { flock -n 9 || exit 0; }
|
||||
|
||||
# Mirrors interface_ifb_name() in qosify: "ifb-<dev>" while strlen(dev) + 4 is
|
||||
# below IFNAMSIZ. Longer names take a different branch upstream which we do not
|
||||
# try to reproduce here.
|
||||
# below IFNAMSIZ, else "ifb-" + the first two and last nine characters of dev
|
||||
# (21cc618). Older builds read before the name for long devices, so their ifb
|
||||
# cannot be derived and simply is not found here.
|
||||
ifb_name() {
|
||||
[ "${#1}" -lt 12 ] || return 1
|
||||
echo "ifb-$1"
|
||||
[ "${#1}" -lt 12 ] && echo "ifb-$1" ||
|
||||
echo "ifb-$(printf %.2s "$1")${1#"${1%?????????}"}"
|
||||
}
|
||||
|
||||
qosify_filter() {
|
||||
@@ -44,7 +45,8 @@ qosify_filter() {
|
||||
}
|
||||
|
||||
# qosify's filters sit at QOSIFY_PRIO_BASE (0x110 = 272): its bpf classifier on
|
||||
# egress, and on ingress the classifier plus the DNS and ifb redirects up to 277.
|
||||
# egress, and on ingress the classifier plus the DNS and ifb redirects up to 277
|
||||
# (interface_clear_qdisc() deletes the same six; aa3aa6b uses 272-274 of them).
|
||||
# A clean exit removes them and the root qdisc, so they only survive a crash, and
|
||||
# then the root cake is qosify's too. Another shaper's root qdisc, and a clsact
|
||||
# carrying anyone else's filters, are left alone.
|
||||
@@ -130,7 +132,7 @@ fi
|
||||
for dev in $DEVS; do clear_dev "$dev"; done
|
||||
|
||||
# ifb-dns is qosify's fixed DNS ifb, not derived from any section, and a stop
|
||||
# leaves it up under the kernel's default fq_codel. Deleting its root qdisc only
|
||||
# before 16c95b0 leaves it up under the kernel's default fq_codel. Deleting its root qdisc only
|
||||
# re-attaches the default, so drop the device -- only once qosify has exited.
|
||||
pidof qosify >/dev/null || ip link del ifb-dns 2>/dev/null
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ config interface wan
|
||||
option nat 1
|
||||
option host_isolate 1
|
||||
option autorate_ingress 0
|
||||
option multiqueue 0
|
||||
option ingress_options ""
|
||||
option egress_options ""
|
||||
option options ""
|
||||
|
||||
@@ -6,21 +6,24 @@
|
||||
"qosify": [ "status", "get_stats", "dump" ],
|
||||
"rc": [ "list" ],
|
||||
"service": [ "list" ],
|
||||
"file": [ "read", "stat" ]
|
||||
"network.interface": [ "status" ],
|
||||
"file": [ "read", "stat", "list" ]
|
||||
},
|
||||
"uci": [ "qosify" ],
|
||||
"file": {
|
||||
"/etc/config/qosify": [ "read", "list" ],
|
||||
"/etc/qosify/00-defaults.conf": [ "read", "list" ],
|
||||
"/etc/init.d/qosify": [ "read" ],
|
||||
"/usr/share/qosify-luci/qosify": [ "read" ],
|
||||
"/usr/share/qosify-luci/00-defaults.conf": [ "read" ],
|
||||
"/proc/uptime": [ "read" ],
|
||||
"/proc/[0-9]*/stat": [ "read" ]
|
||||
"/proc/[0-9]*/stat": [ "read" ],
|
||||
"/sys/class/net/*/queues": [ "list" ]
|
||||
}
|
||||
},
|
||||
"write": {
|
||||
"ubus": {
|
||||
"qosify": [ "reload", "check_devices" ],
|
||||
"qosify": [ "reload", "check_devices", "add", "remove" ],
|
||||
"rc": [ "init" ],
|
||||
"uci": [ "revert" ],
|
||||
"file": [ "write", "exec" ]
|
||||
|
||||
Reference in new issue
Block a user