From: Erik Karlsson Date: Wed, 8 Jan 2025 11:22:44 +0000 (+0100) Subject: luci-base: handle default protocol for UCI interfaces X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ba1fb8ee424b8a7b0202d7a1ca01b93e7b8dc576;p=project%2Fluci.git luci-base: handle default protocol for UCI interfaces The protocol defaults to 'none' in netifd if unspecified. Signed-off-by: Erik Karlsson --- diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js index d71aa69fa3..394dffc3f5 100644 --- a/modules/luci-base/htdocs/luci-static/resources/network.js +++ b/modules/luci-base/htdocs/luci-static/resources/network.js @@ -1655,7 +1655,7 @@ Network = baseclass.extend(/** @lends LuCI.network.prototype */ { if (name == null) return null; - proto = (proto == null ? uci.get('network', name, 'proto') : proto); + proto = (proto == null ? (uci.get('network', name, 'proto') || 'none') : proto); var protoClass = _protocols[proto] || Protocol; return new protoClass(name);