luci-mod-system: add current host to reset reconnect#8548
luci-mod-system: add current host to reset reconnect#8548aslafy-z wants to merge 1 commit intoopenwrt:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
In which cases does this happen? The defaults are what is set during a factory reset. |
|
@systemcrash flashing does not mean factory reset. I wrongly mentioned factory reset in the PR desc, and just edited it. Here's the updated section:
|
|
OK - but when flashing without retaining settings ("aka factory reset"), the default is 192.168.1.1. So the question still stands - what do I need to do to find myself in your situation (to reproduce this issue)? |
|
The situation is: "do a sysupgrade to a firmware image whose built-in default LAN IP is not 192.168.1.1". "Without retaining settings" resets to the defaults of the flashed image, not necessarily to the stock OpenWrt defaults. So this is reproducible with custom images that change the LAN address at build time, for example through Image Builder files a baked /etc/config/network, or a uci-defaults script. Example reproduction:
|
When performing a sysupgrade without keeping settings, the reconnect logic only tries the hardcoded 192.168.1.1 and openwrt.lan. This fails silently when the device uses a different static IP. Prepend window.location.host to the reconnect target list, keeping the existing defaults as fallbacks. This matches the behavior already used when settings are kept. Common use case: custom images built with the OpenWrt Image Builder and pre-configured static IPs land on a known address that differs from the defaults after a factory reset. The current host is the most likely correct target since the user is already connected to it. Signed-off-by: Zadkiel AHARONIAN <hello@zadkiel.fr>
Pull Request details
Description
When performing a sysupgrade without keeping settings,
ui.awaitReconnect()only tries the hardcoded
192.168.1.1andopenwrt.lan. This fails silentlywhen the device uses a different static IP, forcing the user to manually
navigate to the correct address.
This change prepends
window.location.hostto the reconnect target list inthe factory reset code path, keeping
192.168.1.1andopenwrt.lanasfallbacks. This matches the behavior already used when settings are kept.
Common use case: custom images built with the OpenWrt Image Builder with
pre-configured static IPs. After flashing, the device comes back on a known
address that differs from the defaults.
Screenshot or video of changes (If applicable)
N/A - behavior change only visible during sysupgrade reconnect.
Maintainer (Preferred)
@jow-
Tested on
OpenWrt version: 24.10.6
LuCI version: git-24.xxx (luci-mod-system)
Web browser: Firefox
Checklist
Signed-off-by: <my@email.address>row (viagit commit --signoff).<package name>: titlefirst line subject for packages.