From 8c2ea08aa826651d3c60ced8a45281f44810c4e3 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 29 Mar 2021 16:27:47 +0200 Subject: [PATCH] luci-mod-network: fix unsetting network.device options The existing logic only handled removing the last remaining device section option (which results in the deletion of the entire section) but failed to actually unset single options. Signed-off-by: Jo-Philipp Wich (cherry picked from commit b9fad85f2e3fc988528fd326db715719288604ea) --- .../htdocs/luci-static/resources/tools/network.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js index 829ab14963..cd51a0391c 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js @@ -158,6 +158,8 @@ function deviceRemove(section_id) { if (empty) uci.remove('network', ds); + else + uci.unset('network', ds, this.option); } uci.unset('network', section_id, this.option);