mirror of
https://github.com/openwrt/luci.git
synced 2026-05-31 10:31:55 +08:00
7fac2bef4f
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>