From ba1fb8ee424b8a7b0202d7a1ca01b93e7b8dc576 Mon Sep 17 00:00:00 2001 From: Erik Karlsson Date: Wed, 8 Jan 2025 12:22:44 +0100 Subject: [PATCH] luci-base: handle default protocol for UCI interfaces The protocol defaults to 'none' in netifd if unspecified. Signed-off-by: Erik Karlsson --- modules/luci-base/htdocs/luci-static/resources/network.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2