Skip to content

Commit

Permalink
luci-base: handle default protocol for UCI interfaces
Browse files Browse the repository at this point in the history
The protocol defaults to 'none' in netifd if unspecified.

Signed-off-by: Erik Karlsson <[email protected]>
  • Loading branch information
Erik Karlsson authored and systemcrash committed Jan 22, 2025
1 parent ff52c0e commit ba1fb8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/luci-base/htdocs/luci-static/resources/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ba1fb8e

Please sign in to comment.