From c431856e5c1c227877b31e6586f4c4eac7d5fd68 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 14 Jul 2014 07:38:23 +0000 Subject: 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 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41632 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/ramips/base-files/etc/uci-defaults/02_network | 1 + 1 file changed, 1 insertion(+) (limited to 'target/linux/ramips') 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) ;; -- cgit v1.2.3