aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2020-11-03 17:43:22 +0100
committerJohn Crispin <john@phrozen.org>2020-11-04 07:36:49 +0100
commitbe09c5a3cd6535ccfc6b1628546c0416d94bd131 (patch)
treefa52ddb71dab5721bbc130ebb727f58e0399916c /package/base-files/files/lib
parentdf9ee254aae57752ea23ea17372b08947a01ef71 (diff)
downloadupstream-be09c5a3cd6535ccfc6b1628546c0416d94bd131.tar.gz
upstream-be09c5a3cd6535ccfc6b1628546c0416d94bd131.tar.bz2
upstream-be09c5a3cd6535ccfc6b1628546c0416d94bd131.zip
base-files: add board.d support for bridge device
Latest netifd allows us to setup network bridges with implicit vlan tagging. For this to work, we need to setup several additional uci sections. This feature is particularly usefull for DSA tupe devices. Add board.d and uci-defaults support for generating the sections. Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'package/base-files/files/lib')
-rwxr-xr-xpackage/base-files/files/lib/functions/uci-defaults.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh
index 27a409fe3b..39bbeda24c 100755
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -90,6 +90,10 @@ ucidef_set_interfaces_lan_wan() {
ucidef_set_interface_wan "$wan_if"
}
+ucidef_set_bridge_device() {
+ json_add_string bridge "${1:switch0}"
+}
+
_ucidef_add_switch_port() {
# inherited: $num $device $need_tag $want_untag $role $index $prev_role
# inherited: $n_cpu $n_ports $n_vlan $cpu0 $cpu1 $cpu2 $cpu3 $cpu4 $cpu5