diff -r -u 0.7.0.3/etc/banner 0.7.0.4/etc/banner --- 0.7.0.3/etc/banner 2006-09-01 23:47:55.000000000 +0900 +++ 0.7.0.4/etc/banner 2006-09-13 02:41:30.000000000 +0900 @@ -4,7 +4,7 @@ | | |_______||__| |__| |___| - Fonera Firmware (Version 0.7.0 rev 3) ------------- + Fonera Firmware (Version 0.7.0 rev 4) ------------- * * Based on OpenWrt - http://openwrt.org * Powered by FON - http://www.fon.com diff -r -u 0.7.0.3/etc/fon_revision 0.7.0.4/etc/fon_revision --- 0.7.0.3/etc/fon_revision 2006-09-01 03:07:46.000000000 +0900 +++ 0.7.0.4/etc/fon_revision 2006-09-12 06:43:42.000000000 +0900 @@ -1 +1 @@ -3 +4 diff -r -u 0.7.0.3/etc/init.d/rcS 0.7.0.4/etc/init.d/rcS --- 0.7.0.3/etc/init.d/rcS 2006-09-01 00:32:14.000000000 +0900 +++ 0.7.0.4/etc/init.d/rcS 2006-09-12 22:16:13.000000000 +0900 @@ -10,6 +10,7 @@ /etc/init.d/boot sysctl -p >&- lock /var/run/network-connection + lock /var/run/restart-services for i in /etc/init.d/S*; do $i start 2>&1 done @@ -17,6 +18,19 @@ for i in /etc/init.d/N*; do $i start 2>&1 - done + done + + while :; do + lock /var/run/restart-services + killall N50chillispot + killall chilli + killall dnsmasq + ifup lan_noinet + ifup wan + /etc/init.d/S45firewall + for i in /etc/init.d/N*; do + $i start 2>&1 + done + done ) | logger -s -p 6 -t '' & diff -r -u 0.7.0.3/sbin/ifup 0.7.0.4/sbin/ifup --- 0.7.0.3/sbin/ifup 2006-09-01 00:32:14.000000000 +0900 +++ 0.7.0.4/sbin/ifup 2006-09-12 19:06:38.000000000 +0900 @@ -38,7 +38,10 @@ ifconfig "$dev" $ipaddr netmask $netmask up config_get gateway $ifn gateway - [ -n "$gateway" ] && route add default gw "$gateway" + [ -n "$gateway" ] && { + while route del default >&- 2>&- ; do :; done + route add default gw "$gateway" + } config_get dns "$ifn" dns [ -n "$dns" ] && { @@ -106,6 +109,7 @@ esac iwconfig $vif channel 0 + ifconfig $vif up iwpriv $vif mode $bgmode iwpriv $vif pureg $pureg [ -n "$channel" -a -z "${channel%%[0-9][0-9]}" ] && { @@ -121,7 +125,7 @@ setup_wifi_common ath0 config_get ssid public essid - iwconfig ath0 essid "FON_${ssid:-HotSpot}" + iwconfig ath0 essid "FON_${ssid:-AP}" ifconfig eth0 up ifconfig ath0 up } @@ -155,7 +159,6 @@ setup_wifi_common ath1 iwconfig ath1 essid "$ssid" iwpriv ath0 authmode $sh_auth - ifconfig ath1 up [ -z "$wep" ] || { for k in 1 2 3 4; do @@ -165,6 +168,7 @@ iwconfig ath1 enc "[$wep]" } [ -z "$crypt" -o -z "$wpa" ] || ( + killall hostapd 2>/dev/null >/dev/null && sleep 1 cat > /tmp/hostapd.conf </dev/null 2>/dev/null & + lock -u /var/run/restart-services SAVED=1 } fi diff -r -u 0.7.0.3/www/cgi-bin/webif/connection.sh 0.7.0.4/www/cgi-bin/webif/connection.sh --- 0.7.0.3/www/cgi-bin/webif/connection.sh 2006-09-01 00:32:13.000000000 +0900 +++ 0.7.0.4/www/cgi-bin/webif/connection.sh 2006-09-12 22:16:13.000000000 +0900 @@ -25,6 +25,8 @@ V_PPTP="required" ;; esac + FORM_username=$(echo -e "$FORM_username" |sed s/\`//g|sed s/\"//g) + FORM_password=$(echo -e "$FORM_password" |sed s/\`//g|sed s/\"//g) validate <>|$V_S|$FORM_ip ip|FORM_netmask|@TR<>|$V_S|$FORM_netmask @@ -58,7 +60,7 @@ ;; esac commit_settings - ( ifup wan; /etc/init.d/S45firewall start ) >/dev/null 2>/dev/null & + lock -u /var/run/restart-services SAVED=1 } fi diff -r -u 0.7.0.3/www/cgi-bin/webif/private.sh 0.7.0.4/www/cgi-bin/webif/private.sh --- 0.7.0.3/www/cgi-bin/webif/private.sh 2006-09-01 00:32:13.000000000 +0900 +++ 0.7.0.4/www/cgi-bin/webif/private.sh 2006-09-13 00:39:32.000000000 +0900 @@ -7,7 +7,6 @@ get_default ssid private essid get_default enc private encryption get_default crypto private wpa_crypto - FORM_crypto=default case "${FORM_enc##/*}" in wep|WEP) FORM_auth=wep;; WPA|WPA1|wpa|wpa1) FORM_auth=wpa;; @@ -19,6 +18,7 @@ aes|AES|ccmp|CCMP) FORM_crypto="aes";; tkip|TKIP) FORM_crypto="tkip";; tkip+aes|TKIP+AES|aes+tkip|AES+TKIP) FORM_crypto="tkip+aes";; + *) FORM_crypto=tkip+aes;; esac get_default psk private password get_default wepkey private wepkey @@ -33,6 +33,7 @@ eval "V_K$FORM_wepkey=required" ;; esac + FORM_ssid=$(echo -e "$FORM_ssid" |sed s/\`//g|sed s/\"//g) validate <>|required max=28|$FORM_ssid user|FORM_ssid|@TR<>||$FORM_ssid @@ -53,7 +54,7 @@ case "$FORM_auth" in wpa|wpa2|mixed) save_setting fon private encryption "$FORM_auth" - save_setting fom private wpa_crypto "$FORM_crypto" + save_setting fon private wpa_crypto "$FORM_crypto" save_setting fon private password "$FORM_psk" ;; wep) @@ -106,10 +107,9 @@ start_div|wpa_stuff field|Cipher select|crypto|$FORM_crypto -option|default|Default +option|tkip+aes|Mixed option|tkip|TKIP option|aes|AES -option|tkip+aes|Mixed field|WPA Passphrase text|psk|$FORM_psk diff -r -u 0.7.0.3/www/cgi-bin/webif/public.sh 0.7.0.4/www/cgi-bin/webif/public.sh --- 0.7.0.3/www/cgi-bin/webif/public.sh 2006-09-01 00:32:13.000000000 +0900 +++ 0.7.0.4/www/cgi-bin/webif/public.sh 2006-09-13 00:25:21.000000000 +0900 @@ -7,6 +7,7 @@ if empty "$FORM_submit"; then get_default ssid public essid else + FORM_ssid=$(echo -e "$FORM_ssid" |sed s/\`//g|sed s/\"//g) validate <>|required max=28|$FORM_ssid user|FORM_ssid|@TR<>||$FORM_ssid @@ -14,7 +15,7 @@ equal "$?" 0 && { save_setting fon public essid "$FORM_ssid" commit_settings - ( ifconfig ath0 && ifup hotspot & ) >/dev/null 2>/dev/null + iwconfig ath0 essid "FON_$FORM_ssid" SAVED=1 } fi diff -r -u 0.7.0.3/www/cgi-bin/webif/upgrade.sh 0.7.0.4/www/cgi-bin/webif/upgrade.sh --- 0.7.0.3/www/cgi-bin/webif/upgrade.sh 2006-09-01 00:32:13.000000000 +0900 +++ 0.7.0.4/www/cgi-bin/webif/upgrade.sh 2006-09-12 04:32:00.000000000 +0900 @@ -9,7 +9,7 @@ { echo "Stopping services..." ps | grep N50chillispot | awk '{ print $1 }' | xargs kill -KILL - ps | grep -vE 'Command|init|\[[kbmj]|httpd|haserl|bstrip|bin/sh|awk|kill|ps|webif' | awk '{ print $1 }' | xargs kill -KILL + ps | grep -vE 'Command|init|\[[kbmj]|httpd|haserl|bstrip|bin/sh|awk|kill|ps|webif|watchdog' | awk '{ print $1 }' | xargs kill -KILL MEMFREE="$(awk 'BEGIN{ mem = 0 } ($1 == "MemFree:") || ($1 == "Cached:") {mem += int($2)} END{print mem}' /proc/meminfo)" echo "Freed memory $MEMFREE" CWD=$(pwd)