Repository navigation
v1.19.3
v1.19.3 — 判定引擎修复:L2 识别链、带宽腐蚀与 DSA 适配
本版核心修复来自外部贡献者 PI-Cursor DS 的全库代码审查(PR #1),经维护者行为级独立审计后合并。
修复
P0 · 场景识别 IP 段/端口链全失效:sense.awk 两处变量链断裂(分类写入局部变量、调用方读从未赋值的全局名),导致游戏 IP 段与端口规则两条识别链 100% 落空——裸 IP 直连流量(游戏/P2P 的核心形态,无域名、无 SNI)此前永远判不出场景。修复后裸 IP 直连正确命中游戏段,非游戏 IP 不误判。同一处还有一个跨记录累乘缺陷:网段基准值逐条翻倍溢出,即使分类修好也匹配不上,已一并修复。
P1 · 带宽反复切换被腐蚀:进入延迟优化档时带宽 ×0.9 写回但不留基准,反复切换档位会让 SQM 带宽一路缩水(实测 4 轮 -27%)。现首次降速前把真实带宽存档,此后降速与恢复都以存档为基准,标准档恢复原始带宽。
P1 · 「vs 基线」增益层从未渲染:吞吐图增益层引用了错误的变量名,计算结果为 NaN 被图形层静默吞掉。修复后 A/B 对比的增益线正常绘制。
P1 · netsteer-apply 参数被静默吞掉:任何调用一律全量应用,传参无效。现支持 apply / clear / preset {all|balanced|off} / auto,未知参数报错退出。
P2 · DSA 命名设备适配:吞吐采样与分核应用此前硬编码 eth0/eth1,在 lan1/wan 命名的现代 OpenWrt 设备(DSA 交换芯片主流形态)上采样为零、配置失效。现通过 sysfs 物理口探测与 WAN 角色判定(ubus → uci → 默认路由逐级回退)动态适配,pppoe-wan 等虚拟口正确归入承载层。
P2 · 状态文件原子写:场景状态落盘改为临时文件 + 原子替换,前端轮询不会再读到半截内容。
CI · 版本守卫加固:PR 事件的 N/merge 引用名此前可穿过版本守卫使构建崩溃;现仅接受完整 N.N.N 形态,构建脚本对版本串做字符白名单校验。
验证
单测 413 全绿(场景识别 21→26,含裸 IP 直连、非首条 IP 规则、端口链协议不匹配等新增断言);真机 e2e 16/16;核心修复均在真实路由器上复现验证(修复前裸 IP 判 normal → 修复后判 gaming)。本版无新功能,调度逻辑不变,升级即用。
v1.19.3 — Detection engine fixes: L2 classification chain, bandwidth corrosion, DSA adaptation
The core fixes in this release come from a full-repo code review by external contributor PI-Cursor DS (PR #1), merged after an independent, behavior-level audit by the maintainer.
Fixes
P0 · Scene classification: IP-range and port chains never fired. sense.awk had two broken variable chains (the category was written to a function-local variable while the caller read a never-assigned global name), which silenced the entire IP-range and port-rule classification paths — bare-IP direct traffic (the core pattern of gaming and P2P: no domain name, no SNI) could never be classified. After the fix, bare-IP direct connections correctly match game ranges, and non-game IPs are not misclassified. A companion defect in the same code path — the range base value multiplying across records until it overflowed — is fixed as well; even with the category fixed, no range would have matched.
P1 · Repeated mode switching corrupted bandwidth. Entering the latency tier wrote bandwidth × 0.9 back without keeping a baseline, so repeated switching kept shrinking the SQM bandwidth (measured −27% over four cycles). The true bandwidth is now archived before the first downshift; both the downshift and the standard-tier restore work from the archive.
P1 · The "vs baseline" gain layer never rendered. The throughput chart's gain layer referenced a wrong variable name, producing NaN that the SVG layer silently swallowed. The A/B gain line now draws.
P1 · netsteer-apply silently ignored arguments. Every invocation ran a full apply regardless of arguments. It now supports apply / clear / preset {all|balanced|off} / auto and rejects unknown arguments with a usage message and exit code 1.
P2 · DSA-named device adaptation. Throughput sampling and RPS/XPS application hardcoded eth0/eth1, which zeroes sampling and breaks configuration on modern OpenWrt devices with lan1/wan naming (DSA switch chips). Physical interfaces are now detected via sysfs and the WAN role is resolved through ubus → uci → default-route fallback; virtual carriers such as pppoe-wan are classified correctly.
P2 · Atomic state writes. The scene state file is now written via temp-file + atomic rename, so the polling front end can no longer read a half-written file.
CI · Hardened version guard. The N/merge ref from pull-request events previously slipped through the version guard and crashed the build. Only full N.N.N forms are accepted now, and the build script validates the version string against a character whitelist.
Verification
413 unit tests green (scene classification 21→26, with new assertions for bare-IP direct hits, non-first IP rules, and protocol-mismatched port chains); 16/16 on-device e2e; core fixes were reproduced and verified on real hardware (bare IP classified normal before, gaming after). No new features; steering logic is unchanged. Upgrade and go.
Download the .apk matching your device architecture (check /etc/apk/arch on the router).
Install (OpenWrt 24.10+/25.12):
apk add --allow-untrusted /tmp/luci-app-netsteer-*.apk
Built automatically by CI from this tag — unit tests + 4-arch build matrix.
Every package is verified with apk verify before it is attached.