Changeset 1688

Show
Ignore:
Timestamp:
21/07/10 14:56:15 (3 years ago)
Author:
matthijs
Message:

Use the right MAC address for retrieving configuration updates.

The MAC address asignment of the 2.0n has changed with the 2.3.6.0 release. To
make sure the Foneras keep identifying themselves with the same MAC address,
the 2.0n needs to get the address from a different interface.

This fixes configuration changes made through fon.com, as well as Family &
Friends. See #620 for details.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/fon/fonbase/files/bin/thinclient

    r1120 r1688  
    1313        MODE=$1 
    1414        VOUCHER=$2 
     15        DEVICE="$(cat /etc/fon_device)" 
    1516        # gather the MAC addresses 
    1617        ETMAC=$( ifconfig $lan_ifname|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g" ) 
    17         WLMAC=$( ifconfig $wifi_ifname|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g" ) 
     18        if [ "${DEVICE}" == "fonera20n" ]; then 
     19                # The first few firmware versions had their MAC address 
     20                # assignments swapped. This was later corrected, but a lot of 
     21                # devices had been registered at fon with the "wrong" mac 
     22                # address already. 
     23                # To fix this, we send the eth0 (WAN) mac address instead of the 
     24                # real public wifi mac address (which used to be the public wifi 
     25                # mac address). 
     26                wl_if=eth0.1 
     27        else 
     28                wl_if=$wifi_ifname 
     29        fi 
     30        WLMAC=$( ifconfig $wl_if|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g" ) 
    1831        FONREV="$(cat /etc/fon_revision)" 
    1932        FIRMWARE="$(cat /etc/fon_version)" 
    20         DEVICE="$(cat /etc/fon_device)" 
    2133        SERVER=fatserver.fon.com 
    2234        PORT=1938