diff options
author | John Crispin <john@openwrt.org> | 2014-06-02 12:43:04 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2014-06-02 12:43:04 +0000 |
commit | 9b728bebfb8f07ec05404efed5c4d75c89c9b8e9 (patch) | |
tree | 1a98fb87019157b9ec75949b34c0801c38ba0137 /target/linux/ramips/base-files/etc/uci-defaults/02_network | |
parent | 36d0a5e3fb39eb43b64760febf668c8968bc9f38 (diff) | |
download | mtk-20170518-9b728bebfb8f07ec05404efed5c4d75c89c9b8e9.zip mtk-20170518-9b728bebfb8f07ec05404efed5c4d75c89c9b8e9.tar.gz mtk-20170518-9b728bebfb8f07ec05404efed5c4d75c89c9b8e9.tar.bz2 |
ramips: fix not set lan/wan mac address
The first switch case is default case. Then it will only
match default case. cause not update the lan/wan mac address.
And in the default switch case the param lan_mac is empty.
it will case error message 'arithmetic syntax error' when
call macaddr_add function.
Signed-off-by: michael lee <igvtee@gmail.com>
SVN-Revision: 40910
Diffstat (limited to 'target/linux/ramips/base-files/etc/uci-defaults/02_network')
-rwxr-xr-x | target/linux/ramips/base-files/etc/uci-defaults/02_network | 8 |
1 files changed, 4 insertions, 4 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 b9524f6..e167ddb 100755 --- a/target/linux/ramips/base-files/etc/uci-defaults/02_network +++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network @@ -179,10 +179,6 @@ ramips_setup_macs() local wan_mac="" case $board in - *) - wan_mac=$(macaddr_add "$lan_mac" 1) - ;; - br-6475nd) lan_mac=$(mtd_get_mac_binary devdata 13) wan_mac=$(mtd_get_mac_binary devdata 7) @@ -240,6 +236,10 @@ ramips_setup_macs() wan_mac=$(macaddr_add "$lan_mac" 1) ;; + *) + wan_mac=$(macaddr_add "$lan_mac" 1) + ;; + esac [ -n "$lan_mac" ] && ucidef_set_interface_macaddr lan $lan_mac |