From: John Crispin Date: Mon, 14 Jul 2014 07:38:23 +0000 (+0000) Subject: ramips: extract default lan_mac from eth0 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4af1b51ec3797318645f6fbc52278b0473a2b3f9;p=openwrt%2Fstaging%2Fwigyori.git ramips: extract default lan_mac from eth0 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 SVN-Revision: 41632 --- 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 472ae588d5..39f46bb979 100755 --- a/target/linux/ramips/base-files/etc/uci-defaults/02_network +++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network @@ -258,6 +258,7 @@ ramips_setup_macs() ;; *) + lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 1) ;;