Files
booksprite/spec/unit
WarliumandClaude Sonnet 4.6 730285210c NetworkMgr: re-DHCP after Wi-Fi network switch on Kobo (#14790) (#15618)
On Kobo, isConnected is aliased to ifHasAnAddress, which returns true as
long as the interface holds any IP — including a stale lease from a
previous network. The early-return gate in turnOnWifiAndWaitForConnection
short-circuits before obtainIP() ever runs, so after switching networks
KOReader reports "Connected" while every request times out on the old
subnet's gateway.

Track the SSID a lease was obtained for (lease_ssid) and add
hasLeaseForCurrentNetwork(), which compares it against wpa_supplicant's
reported association. Guard the fast-path gates in
turnOnWifiAndWaitForConnection and doNothingAndWaitForConnection with it:
on a stale lease, release the old IP and fall through to the normal
reconnect path. lease_ssid is set in reconnectOrShowNetworkMenu (sync
connect) and connectivityCheck (async restore), and cleared when Wi-Fi
goes down or a connection is aborted.

When the backend cannot report an SSID (non-wpa_supplicant platforms),
hasLeaseForCurrentNetwork() returns true so connections are never churned
on uncertainty, preserving existing behaviour everywhere but Kobo.

Refs #14790, #14478, #14716

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjgwQjZY2xoZPSuSXBJqv8
2026-07-01 21:50:26 +02:00
..
2025-01-29 21:33:44 +01:00
2025-01-25 21:58:40 +01:00
2024-11-25 22:55:57 +01:00
2026-05-18 19:15:02 +02:00
2024-12-18 19:40:22 +01:00
2017-04-24 08:27:29 +02:00
2024-12-25 17:29:40 +01:00
2017-09-23 20:24:45 +02:00
2024-11-25 22:55:57 +01:00