ramips: fix not set lan/wan mac address
authorJohn Crispin <john@openwrt.org>
Mon, 2 Jun 2014 12:43:04 +0000 (12:43 +0000)
committerJohn Crispin <john@openwrt.org>
Mon, 2 Jun 2014 12:43:04 +0000 (12:43 +0000)
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

target/linux/ramips/base-files/etc/uci-defaults/02_network

index b9524f6d2c726bdb5721e91da566346c9e88a104..e167ddb84fded90a09a977bb9a394a9f0ee1254f 100755 (executable)
@@ -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