From 4af1b51ec3797318645f6fbc52278b0473a2b3f9 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 14 Jul 2014 07:38:23 +0000 Subject: [PATCH] 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 --- 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 472ae588d5b..39f46bb979a 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) ;;