[openwrt/openwrt] base-files: generate bridge device sections with br- name prefix

LEDE Commits lede-commits at lists.infradead.org
Thu May 20 03:09:36 PDT 2021


On 20.05.21 10:41, LEDE Commits wrote:
> rmilecki pushed a commit to openwrt/openwrt.git, branch master:
> https://git.openwrt.org/0e459668c5b3b158991803204f628b1b7dce9034
>
> commit 0e459668c5b3b158991803204f628b1b7dce9034
> Author: Rafał Miłecki <rafal at milecki.pl>
> AuthorDate: Thu May 20 10:32:18 2021 +0200
>
>      base-files: generate bridge device sections with br- name prefix
>      
>      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 <mail at david-bauer.net>
>      Fixes: 43fc720657c6 ("base-files: generate "device" UCI type section for bridge")
>      Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
> ---
>   package/base-files/files/bin/config_generate | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> 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. at device[-1].name='$1'
> +			set network. at device[-1].name='br-$1'
>   			set network. at device[-1].type='bridge'

so now the device called bridge, will instead be called br-bridge ? 
seems redundant.

     John


>   		EOF
>   		for port in $ports; do uci add_list network. at device[-1].ports="$port"; done
> -		ifname=$1
> +		ifname=br-$1
>   		type=
>   	}
>   
>
> _______________________________________________
> lede-commits mailing list
> lede-commits at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-commits



More information about the lede-commits mailing list