[source] base-files: emit tagged switch configuration by default
LEDE Commits
lede-commits at lists.infradead.org
Wed Feb 1 15:15:45 PST 2017
jow pushed a commit to source.git, branch master:
https://git.lede-project.org/73d923ed6baabe3f8844f13216c50a6383a79a46
commit 73d923ed6baabe3f8844f13216c50a6383a79a46
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Sun Oct 16 01:31:03 2016 +0200
base-files: emit tagged switch configuration by default
Instead of only using tagged CPU port configurations when more than one VLAN
is present on the switch, always emit tagged configurations unless a board
explicitely opts out of this behaviour by using the previously introduced
[0-9]u at netdev syntax.
Emitting default tagged configurations has the following benefits:
- Relation of switch vlans to netdevs is easier to understand, especially
for multi-cpu-port switches
- Adding additional VLANs (e.g. to break out a LAN port for other purposes)
becomes easier as users are not forced to change the existing untagged
VLAN to tagged and the existing ifname notation from ethX to ethX.Y
anymore, drastly reducing the likelyhood of soft-bricks.
Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
package/base-files/files/lib/functions/uci-defaults.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh
index 3500d49..f4c1d96 100755
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -160,7 +160,7 @@ _ucidef_finish_switch_roles() {
json_select ..
json_select ..
- if [ $n_vlan -gt $n_cpu -o ${need_tag:-0} -eq 1 ]; then
+ if [ ${need_tag:-0} -eq 1 -o ${want_untag:-0} -ne 1 ]; then
num="${num}t"
device="${device}.${index}"
fi
More information about the lede-commits
mailing list