Merge pull request #5270 from vgaetera/iface-lo
authorJo-Philipp Wich <jo@mein.io>
Thu, 19 Aug 2021 07:16:09 +0000 (09:16 +0200)
committerGitHub <noreply@github.com>
Thu, 19 Aug 2021 07:16:09 +0000 (09:16 +0200)
luci-base: support loopback by widgets.NetworkSelect

modules/luci-base/htdocs/luci-static/resources/tools/widgets.js

index 3f2b7b9ffcfafbcf888d29ab56eabe039628516c..35a4dc8ec9dcc5b8f897d782d0236a108ce5ca96 100644 (file)
@@ -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())