ramips: extract default lan_mac from eth0
authorJohn Crispin <john@openwrt.org>
Mon, 14 Jul 2014 07:38:23 +0000 (07:38 +0000)
committerJohn Crispin <john@openwrt.org>
Mon, 14 Jul 2014 07:38:23 +0000 (07:38 +0000)
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 <roman@advem.lv>
SVN-Revision: 41632

target/linux/ramips/base-files/etc/uci-defaults/02_network

index 472ae588d5b564b2393b117b419038dd0b6e9c4f..39f46bb979a6c5030346bc94bee0519de823cce9 100755 (executable)
@@ -258,6 +258,7 @@ ramips_setup_macs()
                ;;
 
        *)
+               lan_mac=$(cat /sys/class/net/eth0/address)
                wan_mac=$(macaddr_add "$lan_mac" 1)
                ;;