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 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 03:48:32 +00:00
parent 088c256f58
commit 30953399b6
@@ -249,8 +249,7 @@ _ping_iface() {
_gw_loss=$(echo "$_gw_out" | sed -n 's/.* \([0-9]*\)% packet loss.*/\1/p') _gw_loss=$(echo "$_gw_out" | sed -n 's/.* \([0-9]*\)% packet loss.*/\1/p')
if [ -n "$_gw_loss" ] && [ "$_gw_loss" != "100" ]; then if [ -n "$_gw_loss" ] && [ "$_gw_loss" != "100" ]; then
_loss="$_gw_loss" _loss="$_gw_loss"
_avg=$(echo "$_gw_out" | tail -1 | sed -n 's/.*=\ [0-9.]*\/\([0-9.]*\)\/.*/\1/p') _avg="null" # gateway RTT is LAN latency, not meaningful as WAN metric
[ -z "$_avg" ] && _avg="null"
fi fi
fi fi
fi fi
@@ -335,7 +334,7 @@ _detect_carrier() {
for _n in 1 2; do for _n in 1 2; do
_mod=$(_read_file "${AIWANBAL_DIR}/wan${_n}_modem_type" 2>/dev/null) _mod=$(_read_file "${AIWANBAL_DIR}/wan${_n}_modem_type" 2>/dev/null)
_active=$(_read_file "${AIWANBAL_DIR}/wan${_n}_state" 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 echo "$_mod"; return
fi fi
done done