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>
Mon, 24 May 2021 05:48:17 +0000 (07:48 +0200)
Fixes: 43fc720657c6 ("base-files: generate "device" UCI type section for bridge")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
package/base-files/files/bin/config_generate

index efcd7342423268ea60a004942c3e4f1f04faf6ad..604c49a7090d670bab9fbd1941cdddb86ac5f014 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" ] && {