[openwrt/openwrt] base-files: support setting bridge MAC address

LEDE Commits lede-commits at lists.infradead.org
Thu May 27 03:55:17 PDT 2021


rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/fc605c01f6d1fd8e2aa8ede83b03ae87f12524a9

commit fc605c01f6d1fd8e2aa8ede83b03ae87f12524a9
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Mon May 24 07:46:12 2021 +0200

    base-files: support setting bridge MAC address
    
    Fixes: 43fc720657c6 ("base-files: generate "device" UCI type section for bridge")
    Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
    (cherry picked from commit 7a90ad3c431031191afe51b163bf97d3ec820d54)
---
 package/base-files/files/bin/config_generate | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate
index efcd734242..604c49a709 100755
--- a/package/base-files/files/bin/config_generate
+++ b/package/base-files/files/bin/config_generate
@@ -114,10 +114,12 @@ generate_network() {
 			add network device
 			set network. at device[-1].name='br-$1'
 			set network. at device[-1].type='bridge'
+			set network. at device[-1].macaddr='$macaddr'
 		EOF
 		for port in $ports; do uci add_list network. at device[-1].ports="$port"; done
 		ifname=br-$1
 		type=
+		macaddr=""
 	}
 
 	[ -n "$bridge" ] && {



More information about the lede-commits mailing list