mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-06 22:08:54 +00:00
base-files: set MAC for bridge ports (devices) instead of bridge itself
This restores the original config_generate behaviour. With MAC set for
bridged devices the bridge automatically gets its MAC adjusted (it picks
the lowest MAC of bridged devices).
This fixes confusing interfaces setup (bridge ports not having custom
MAC assigned).
Reported-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
Fixes: e002179a6d
("base-files: simplify setting device MAC")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: maurerr <mariusd84@gmail.com>
This commit is contained in:
parent
8440bd7dc0
commit
6dc608841f
@ -114,9 +114,17 @@ 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
|
||||
[ -n "macaddr" ] && {
|
||||
for port in $ports; do
|
||||
uci -q batch <<-EOF
|
||||
add network device
|
||||
set network.@device[-1].name='$port'
|
||||
set network.@device[-1].macaddr='$macaddr'
|
||||
EOF
|
||||
done
|
||||
}
|
||||
device=br-$1
|
||||
type=
|
||||
macaddr=""
|
||||
|
Loading…
Reference in New Issue
Block a user