luci-mod-system: add current host to reset reconnect
authorZadkiel AHARONIAN <redacted>
Sun, 12 Apr 2026 16:09:41 +0000 (18:09 +0200)
committerPaul Donald <redacted>
Thu, 14 May 2026 10:53:09 +0000 (13:53 +0300)
commit7fac2bef4f95d918df6356ae342f7cf50102d308
tree499b16e03b038ba2637c99791f24c2a691a73943
parent47c8d278266235f820efdd98ce189173c446afc3
luci-mod-system: add current host to reset reconnect

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 <redacted>
modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js
git clone https://git.99rst.org/PROJECT