diff options
author | John Crispin <john@openwrt.org> | 2014-07-14 07:38:23 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2014-07-14 07:38:23 +0000 |
commit | 4af1b51ec3797318645f6fbc52278b0473a2b3f9 (patch) | |
tree | d4bd9ce42c5287ad2c788d0d2f038d0f9525cc02 /target | |
parent | 1d11ffa4f2c379c3b2e5ec247f3cc7707112d97e (diff) | |
download | upstream-4af1b51ec3797318645f6fbc52278b0473a2b3f9.tar.gz upstream-4af1b51ec3797318645f6fbc52278b0473a2b3f9.tar.bz2 upstream-4af1b51ec3797318645f6fbc52278b0473a2b3f9.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>
SVN-Revision: 41632
Diffstat (limited to 'target')
-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) ;; |