base-files: support setting bridge MAC address
authorRafał Miłecki <rafal@milecki.pl>
Mon, 24 May 2021 05:46:12 +0000 (07:46 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Thu, 27 May 2021 09:39:15 +0000 (11:39 +0200)
Fixes: 43fc720657c6 ("base-files: generate "device" UCI type section for bridge")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 7a90ad3c431031191afe51b163bf97d3ec820d54)

package/base-files/files/bin/config_generate

index efcd734..604c49a 100755 (executable)
@@ -114,10 +114,12 @@ generate_network() {
                        add network device
                        set network.@device[-1].name='br-$1'
                        set network.@device[-1].type='bridge'
+                       set network.@device[-1].macaddr='$macaddr'
                EOF
                for port in $ports; do uci add_list network.@device[-1].ports="$port"; done
                ifname=br-$1
                type=
+               macaddr=""
        }
 
        [ -n "$bridge" ] && {