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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user