Files
vanlink/failover
Andreas WredeandClaude Sonnet 5 b0283f6083 failover: fix enforce_route() to handle gateway-less WANs (cellular)
The EC25/Koodo GSM connection is QMI raw-ip with an on-link /29 and no
gateway at all (nh 0.0.0.0), not a normal DHCP WAN with a temporarily
unknown gateway. enforce_route() required a gw and silently gave up
when none was found, so cellular could be reported up/healthy/preferred
in state.json while never actually getting a default route (Prefer
button had no effect since it only touches metric, not this bailout).
Now falls back to installing a gateway-less `ip route ... dev DEV`
default when the device genuinely has an IPv4 address (carrier truly
up), mirroring what NM itself would install without never-default.
Also fixes stale-route pruning to handle gateway-less old routes,
which the previous gw-only check skipped.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-06 15:10:21 -04:00
..
2026-06-28 15:09:28 -04:00
2026-06-28 15:09:28 -04:00
2026-06-28 15:09:28 -04:00
2026-06-28 15:09:28 -04:00