diff options
author | John Crispin <blogic@openwrt.org> | 2014-07-14 07:38:23 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-07-14 07:38:23 +0000 |
commit | c431856e5c1c227877b31e6586f4c4eac7d5fd68 (patch) | |
tree | aa2556131712fe6e1e78d2922750ef22b2850c8f /target/linux | |
parent | 1a065560fb150e71df64a4b75cd4fbf5307bb30e (diff) | |
download | upstream-c431856e5c1c227877b31e6586f4c4eac7d5fd68.tar.gz upstream-c431856e5c1c227877b31e6586f4c4eac7d5fd68.tar.bz2 upstream-c431856e5c1c227877b31e6586f4c4eac7d5fd68.zip |
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 <roman@advem.lv>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41632 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rwxr-xr-x | target/linux/ramips/base-files/etc/uci-defaults/02_network | 1 |
1 files changed, 1 insertions, 0 deletions
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) ;; |