If a mac address is set for the lan bridge, e.g. network.lan.macaddr=00:1a:70:a0:38:80
then it is only set on the bridge itself and not the sub-devices br-lan Link encap:Ethernet HWaddr 00:1A:70:A0:38:80 lan1 Link encap:Ethernet HWaddr 00:00:00:00:51:81 lan2 Link encap:Ethernet HWaddr 00:00:00:00:51:81 lan3 Link encap:Ethernet HWaddr 00:00:00:00:51:81 lan4 Link encap:Ethernet HWaddr 00:00:00:00:51:81 The attached patch (really simple) also sets the mac address on the sub-devices. It is tested and used for some weeks on LinkSys WRT350Nv2 by some forum members. It is also a prerequisite for the next WRT350Nv2 patch. Kind regards Matthias "Maddes" Bücher -- http://www.maddes.net/ Home: Earth / Germany / Ruhr-Area
Index: package/base-files/files/lib/network/config.sh =================================================================== --- package/base-files/files/lib/network/config.sh (revision 20654) +++ package/base-files/files/lib/network/config.sh (working copy) @@ -115,6 +115,8 @@ config_get iftype "$config" type case "$iftype" in bridge) + local macaddr + config_get macaddr "$config" macaddr [ -x /usr/sbin/brctl ] && { ifconfig "br-$config" 2>/dev/null >/dev/null && { local newdevs devices @@ -139,7 +141,7 @@ # result in another setup_interface() call, so we simply stop processing # the current event at this point. } - ifconfig "$iface" up 2>/dev/null >/dev/null + ifconfig "$iface" ${macaddr:+hw ether "${macaddr}"} up 2>/dev/null >/dev/null return 1 } ;;
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel