From efe5e2ad867247328758fff8d6101cbbbd9e0e77 Mon Sep 17 00:00:00 2001 From: Zadkiel AHARONIAN Date: Sun, 12 Apr 2026 18:09:41 +0200 Subject: [PATCH] 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 --- .../htdocs/luci-static/resources/view/system/flash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js index 94f23f91efaf..59a97efecdb0 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js @@ -337,7 +337,7 @@ return view.extend({ if (opts['keep'][0].checked) ui.awaitReconnect(window.location.host); else - ui.awaitReconnect('192.168.1.1', 'openwrt.lan'); + ui.awaitReconnect(window.location.host, '192.168.1.1', 'openwrt.lan'); }, handleBackupList(ev) {