From 0e459668c5b3b158991803204f628b1b7dce9034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Thu, 20 May 2021 10:32:18 +0200 Subject: base-files: generate bridge device sections with br- name prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Missing br- prefix could result in name conflict between DSA port interface and bridge interface. Some devices with just one LAN port use "lan" interface name for DSA port. Trying to create bridge with the same "lan" name was failing. Reported-by: David Bauer Fixes: 43fc720657c6 ("base-files: generate "device" UCI type section for bridge") Signed-off-by: Rafał Miłecki --- package/base-files/files/bin/config_generate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'package/base-files/files/bin') diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index 0f6f280cf0..efcd734242 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -112,11 +112,11 @@ generate_network() { [ -n "$ports" ] && { uci -q batch <<-EOF add network device - set network.@device[-1].name='$1' + set network.@device[-1].name='br-$1' set network.@device[-1].type='bridge' EOF for port in $ports; do uci add_list network.@device[-1].ports="$port"; done - ifname=$1 + ifname=br-$1 type= } -- cgit v1.2.3