The default case of ramips_setup_macs() is useful when mtd-mac-address is 
defined in dts.
But lan_mac is not set by default, this results in lan and wan having the same 
mac.

Signed-off-by: Roman Yeryomin <[email protected]>
---
 target/linux/ramips/base-files/etc/uci-defaults/02_network | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network 
b/target/linux/ramips/base-files/etc/uci-defaults/02_network
index a14acb6..3b0df72 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -246,6 +246,7 @@ ramips_setup_macs()
                ;;
 
        *)
+               lan_mac=$(cat /sys/class/net/eth0/address)
                wan_mac=$(macaddr_add "$lan_mac" 1)
                ;;
 
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to