From 30953399b611d84ce6d0c1208874f5b2438ec8a8 Mon Sep 17 00:00:00 2001 From: kitadmin Date: Thu, 23 Jul 2026 03:48:32 +0000 Subject: [PATCH] fix: null gateway latency; skip aiwanbal generic modem_type for carrier detection - Gateway ping latency is LAN RTT (<1ms), not WAN latency; set to null so dashboards don't show misleading sub-ms values for Eyeride-NAT'd interfaces - aiwanbal reports modem_type=generic for wired ISP ports; treat same as none so carrier detection falls through to gateway IP pattern matching (AT&T etc.) Co-Authored-By: Claude Sonnet 4.6 --- .../files/usr/lib/busrouter/telemetry-synology.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package/kit-busrouter/files/usr/lib/busrouter/telemetry-synology.sh b/package/kit-busrouter/files/usr/lib/busrouter/telemetry-synology.sh index f87848e..643d9a8 100755 --- a/package/kit-busrouter/files/usr/lib/busrouter/telemetry-synology.sh +++ b/package/kit-busrouter/files/usr/lib/busrouter/telemetry-synology.sh @@ -249,8 +249,7 @@ _ping_iface() { _gw_loss=$(echo "$_gw_out" | sed -n 's/.* \([0-9]*\)% packet loss.*/\1/p') if [ -n "$_gw_loss" ] && [ "$_gw_loss" != "100" ]; then _loss="$_gw_loss" - _avg=$(echo "$_gw_out" | tail -1 | sed -n 's/.*=\ [0-9.]*\/\([0-9.]*\)\/.*/\1/p') - [ -z "$_avg" ] && _avg="null" + _avg="null" # gateway RTT is LAN latency, not meaningful as WAN metric fi fi fi @@ -335,7 +334,7 @@ _detect_carrier() { for _n in 1 2; do _mod=$(_read_file "${AIWANBAL_DIR}/wan${_n}_modem_type" 2>/dev/null) _active=$(_read_file "${AIWANBAL_DIR}/wan${_n}_state" 2>/dev/null) - if [ "$_mod" != "eyeride" ] && [ "$_mod" != "none" ] && [ -n "$_mod" ] && [ "$_active" = "up" ]; then + if [ "$_mod" != "eyeride" ] && [ "$_mod" != "none" ] && [ "$_mod" != "generic" ] && [ -n "$_mod" ] && [ "$_active" = "up" ]; then echo "$_mod"; return fi done