From 376af36975579008e3176a860ae032759d27dcbb Mon Sep 17 00:00:00 2001 From: Vladislav Grigoryev Date: Sun, 15 Aug 2021 02:37:44 +0300 Subject: [PATCH] luci-base: support loopback by widgets.NetworkSelect Support the "loopback" interface by "widgets.NetworkSelect". Enable the "loopback" option to include this interface. Can be used to configure interface binding for services. Signed-off-by: Vladislav Grigoryev --- .../luci-base/htdocs/luci-static/resources/tools/widgets.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js b/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js index 3f2b7b9ffc..35a4dc8ec9 100644 --- a/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js +++ b/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js @@ -372,7 +372,10 @@ var CBINetworkSelect = form.ListValue.extend({ var network = this.networks[i], name = network.getName(); - if (name == 'loopback' || name == this.exclude || !this.filter(section_id, name)) + if (name == this.exclude || !this.filter(section_id, name)) + continue; + + if (name == 'loopback' && !this.loopback) continue; if (this.novirtual && network.isVirtual()) -- 2.30.2