diff -r -u 0.7.0.4/bin/thinclient 0.7.1.1/bin/thinclient
--- 0.7.0.4/bin/thinclient 2006-09-01 00:32:14.000000000 +0900
+++ 0.7.1.1/bin/thinclient 2006-11-20 21:28:21.000000000 +0900
@@ -18,7 +18,7 @@
# gather information about this machine
WLMAC=$( ifconfig $wifi_ifname|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g" )
WLMAC2=$( ifconfig $lan_ifname|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g" )
-ETMAC=$( ifconfig $wan_ifname|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g" )
+ETMAC=$( ifconfig eth0|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g" )
FONREV="$(cat /etc/fon_revision)"
FIRMWARE="$(cat /etc/fon_version)"
diff -r -u 0.7.0.4/etc/banner 0.7.1.1/etc/banner
--- 0.7.0.4/etc/banner 2006-09-13 02:41:30.000000000 +0900
+++ 0.7.1.1/etc/banner 2006-11-22 04:07:20.000000000 +0900
@@ -4,7 +4,7 @@
| | |_______||__| |__|
|___|
- Fonera Firmware (Version 0.7.0 rev 4) -------------
+ Fonera Firmware (Version 0.7.1 rev 1) -------------
*
* Based on OpenWrt - http://openwrt.org
* Powered by FON - http://www.fon.com
diff -r -u 0.7.0.4/etc/fon_revision 0.7.1.1/etc/fon_revision
--- 0.7.0.4/etc/fon_revision 2006-09-12 06:43:42.000000000 +0900
+++ 0.7.1.1/etc/fon_revision 2006-11-16 05:08:40.000000000 +0900
@@ -1 +1 @@
-4
+1
diff -r -u 0.7.0.4/etc/fon_version 0.7.1.1/etc/fon_version
--- 0.7.0.4/etc/fon_version 2006-09-01 00:32:14.000000000 +0900
+++ 0.7.1.1/etc/fon_version 2006-11-16 05:08:40.000000000 +0900
@@ -1 +1 @@
-0.7.0
+0.7.1
diff -r -u 0.7.0.4/etc/functions.sh 0.7.1.1/etc/functions.sh
--- 0.7.0.4/etc/functions.sh 2006-09-01 00:32:14.000000000 +0900
+++ 0.7.1.1/etc/functions.sh 2006-11-15 02:44:26.000000000 +0900
@@ -112,3 +112,18 @@
esac
}
+#
+# This functions forwards a port. The next args are required:
+# $1 = WAN interface
+# $2 = Origin Port
+# $3 = Destination IP
+# $4 = Destination Port
+# $5 = protocol used
+#
+# Example: open_port $WAN 8080 192.168.1.2 80 tcp
+#
+open_port() {
+ iptables -t nat -A prerouting_rule -i $1 -p $5 --dport $2 -j DNAT --to-destination $3:$4
+ pdots=`echo $4 | sed 's/-/:/g'`
+ iptables -A forwarding_rule -i $1 -p $5 --dport $pdots -d $3 -j ACCEPT
+}
diff -r -u 0.7.0.4/etc/init.d/S45firewall 0.7.1.1/etc/init.d/S45firewall
--- 0.7.0.4/etc/init.d/S45firewall 2006-09-01 01:30:55.000000000 +0900
+++ 0.7.1.1/etc/init.d/S45firewall 2006-11-17 22:12:29.000000000 +0900
@@ -105,3 +105,7 @@
}
# check if the connection is already up and add WAN_HOOK rules automatically
env -i ACTION=ifup INTERFACE=wan /bin/sh /etc/hotplug.d/iface/20-firewall
+#
+# Forwarded ports
+#
+/etc/config/openports $WAN
diff -r -u 0.7.0.4/etc/init.d/rcS 0.7.1.1/etc/init.d/rcS
--- 0.7.0.4/etc/init.d/rcS 2006-09-12 22:16:13.000000000 +0900
+++ 0.7.1.1/etc/init.d/rcS 2006-11-15 02:44:26.000000000 +0900
@@ -21,13 +21,24 @@
done
while :; do
+ lock -w /var/run/restart-services
+
+ # just in case
+ lock -u /var/run/network-connection
+ killall lock
+
+ # grab the locks again
lock /var/run/restart-services
+ lock /var/run/network-connection
+
killall N50chillispot
killall chilli
killall dnsmasq
ifup lan_noinet
ifup wan
/etc/init.d/S45firewall
+
+ lock -w /var/run/network-connection
for i in /etc/init.d/N*; do
$i start 2>&1
done
diff -r -u 0.7.0.4/etc/sysctl.conf 0.7.1.1/etc/sysctl.conf
--- 0.7.0.4/etc/sysctl.conf 2006-09-01 00:32:14.000000000 +0900
+++ 0.7.1.1/etc/sysctl.conf 2006-11-08 03:04:39.000000000 +0900
@@ -6,3 +6,4 @@
net.ipv4.tcp_keepalive_time=120
net.ipv4.tcp_timestamps=0
net.ipv4.tcp_vegas_cong_avoid=1
+net.ipv4.ip_local_port_range=4096 8192
diff -r -u 0.7.0.4/usr/lib/webif/advanced.sh 0.7.1.1/usr/lib/webif/advanced.sh
--- 0.7.0.4/usr/lib/webif/advanced.sh 2006-09-01 00:32:13.000000000 +0900
+++ 0.7.1.1/usr/lib/webif/advanced.sh 2006-11-15 02:44:26.000000000 +0900
@@ -1,22 +1,32 @@
ADV_SUBMENU="
+
+
+
+
+
+
"
+
+
diff -r -u 0.7.0.4/usr/lib/webif/form.awk 0.7.1.1/usr/lib/webif/form.awk
--- 0.7.0.4/usr/lib/webif/form.awk 2006-09-01 00:32:13.000000000 +0900
+++ 0.7.1.1/usr/lib/webif/form.awk 2006-11-17 21:48:32.000000000 +0900
@@ -25,7 +25,7 @@
FS="|"
}
-# trim leading whitespaces
+# trim leading whitespaces
{
gsub(/^[ \t]+/,"",$1)
}
@@ -41,7 +41,139 @@
$1 ~ /^infotext/ {
close_field()
- print "@TR<<" $2 ">>
"
+ print "@TR<<" $2 ">>
"
+}
+
+
+#
+# Table issues
+#
+
+$1 ~/^infotable/ {
+ close_field()
+ print "@TR<<" $2 ">>
"
+}
+
+#
+# $2: the summary of the table.
+#
+
+$1 ~ /^start_table/ {
+ close_field()
+ print ""
+}
+
+$1 ~ /^start_border_table/ {
+ close_field()
+ print " "
+ print " "
+ print " "
+ print " "
+}
+
+$1 ~ /^end_border_table/ {
+ close_field()
+ print "
"
+ print " "
+ print "
"
+ print " "
+}
+
+$1 ~ /^end_table/ {
+ close_field()
+ print "
"
+}
+
+#
+# $2: The title of the table
+#
+$1 ~ /^table_caption/ {
+ close_field()
+ print "" $2 " "
+}
+
+#
+# Begins a new row to the table
+#
+$1 ~ /^add_row/ {
+ close_field()
+ print ""
+}
+
+
+$1 ~ /^end_row/ {
+ close_field()
+ print " "
+}
+#
+# Add a cell to the row:
+# $2: height of the row
+# $3: width of the row
+# $4: text of the row
+$1 ~ /^add_title_cell/ {
+ close_field()
+ print "@TR<<" $2 ">> "
+}
+
+$1 ~ /^add_normal_cell/ {
+ close_field()
+ print "" $2 " "
+}
+
+$1 ~ /^add_label_cell/ {
+ close_field()
+ print "" $2 " "
+}
+
+$1 ~ /^add_pass_cell/ {
+ close_field
+ print ""
+ print " " $5
+ print " "
+}
+
+$1 ~ /^start_select_cell/ {
+ opts = ""
+ if (onchange != "") opts = opts " onChange=\"" onchange "()\""
+ print ""
+ print ""
+ select_id = $2
+ select_open = 1
+ select_default = $3
+}
+
+$1 ~ /^end_select_cell/ {
+ close_field()
+ print " "
+}
+
+$1 ~ /^add_input_cell/ {
+ print ""
+ print " " $5
+ print " "
+
+}
+
+$1 ~ /^add_button_cell/ {
+ close_field()
+ print ""
+ print " "
+ print " "
+
+}
+
+$1 ~ /^add_check_cell/ {
+ opts=""
+ if (onchange != "") opts = opts " onClick=\"" onchange "()\" onChange=\"" onchange "()\""
+ print ""$3
+ print " "
+ print " "
+}
+
+# Draw a line
+$1 ~ /^draw_line/ {
+ close_field()
+ print " "
}
$1 ~ /^start_div/ {
@@ -73,7 +205,7 @@
}
$1 ~ /^select/ {
opts = ""
- if (onchange != "") opts = opts " onClick=\"" onchange "()\" onChange=\"" onchange "()\""
+ if (onchange != "") opts = opts " onChange=\"" onchange "()\""
print ""
select_id = $2
select_open = 1
@@ -91,9 +223,9 @@
$1 ~ /^string/ { print $2 }
$1 ~ /^text/ { print " " $4 }
$1 ~ /^password/ { print " " $4 }
-$1 ~ /^submit/ {
+$1 ~ /^submit/ {
close_field()
- print " "
+ print " "
}
($1 ~ /^checkbox/) || ($1 ~ /^radio/) {
@@ -103,3 +235,5 @@
END {
close_field()
}
+
+
diff -r -u 0.7.0.4/usr/lib/webif/validate.awk 0.7.1.1/usr/lib/webif/validate.awk
--- 0.7.0.4/usr/lib/webif/validate.awk 2006-09-01 00:32:13.000000000 +0900
+++ 0.7.1.1/usr/lib/webif/validate.awk 2006-11-18 03:01:48.000000000 +0900
@@ -8,14 +8,20 @@
output=""
}
-{
- valid_type = 0
- valid = 1
- # XXX: weird hack, but it works...
- n = split($0, param, "|")
- value = param[5]
- for (i = 6; i <= n; i++) value = value FS param[i]
- verr = ""
+{
+ valid_type = 0
+ valid = 1
+ if ( $0 ~ /[\\`\"\']/ ) {
+ valid = 0
+ verr = "@TR<>"
+ }
+ else {
+ # XXX: weird hack, but it works...
+ n = split($0, param, "|")
+ value = param[5]
+ for (i = 6; i <= n; i++) value = value FS param[i]
+ verr = ""
+ }
}
$1 == "int" {
@@ -36,20 +42,21 @@
if ((ipaddr[i] < 0) || (ipaddr[i] > 255)) valid = 0
if ((ipaddr[i] == 255) && ($2 != "FORM_netmask")) counter++
}
- if (counter == 4) valid = 0
+ if (counter == 4) valid = 0
}
if (valid == 0) verr = "@TR<>"
}
}
+
$1 == "wep" {
valid_type = 1
if (value !~ /^[0-9A-Fa-f]*$/) {
valid = 0
- verr = "@TR<>"
+ verr = "@TR<>"
} else if ((length(value) != 0) && (length(value) != 10) && (length(value) != 26)) {
valid = 0
- verr = "Invalid key length"
+ verr = "@TR<>"
}
}
@@ -69,7 +76,7 @@
}
}
$1 == "user" {
- valid_type = 1
+ valid_type = 1
if (value ~ /[\<\>\&|;]/) {
valid = 0
verr = "@TR<>"
@@ -97,6 +104,10 @@
valid = 0
verr = "@TR<>"
}
+ if (value > 65535) {
+ valid = 0
+ verr = "@TR<>"
+ }
}
$1 == "ports" {
@@ -114,15 +125,15 @@
valid_type = 1
if (length(value) > 64) {
valid = 0
- verr = "String too long"
+ verr = "@TR<>"
}
if ((length(value) != 0) && (length(value) < 8)) {
valid = 0
- verr = "String too short"
+ verr = "@TR<>"
}
if ((length(value) == 64) && (value ~ /[^0-9a-fA-F]/)) {
valid = 0
- verr = "Invalid hex key"
+ verr = "@TR<>"
}
}
@@ -132,24 +143,24 @@
n = split($4, options, " ")
for (i = 1; (valid == 1) && (i <= n); i++) {
if (options[i] == "required") {
- if (value == "") { valid = 0; verr = "No value entered" }
+ if (value == "") { valid = 0; verr = "@TR<>" }
} else if ((options[i] ~ /^min=/) && (value != "")) {
min = options[i]
sub(/^min=/, "", min)
min = int(min)
if ($1 == "int") {
- if (value < min) { valid = 0; verr = "Value too small (minimum: " min ")" }
+ if (value < min) { valid = 0; verr = "@TR<>" min ")" }
} else if ($1 == "string") {
- if (length(value) < min) { valid = 0; verr = "Value too small (minimum length: " min ")"}
+ if (length(value) < min) { valid = 0; verr = "@TR<>" min ")"}
}
} else if ((options[i] ~ /^max=/) && (value != "")) {
max = options[i]
sub(/^max=/, "", max)
max = int(max)
if ($1 == "int") {
- if (value > max) { valid = 0; verr = "@TR<> (@TR<>: " max ")" }
+ if (value > max) { valid = 0; verr = "@TR<> (@TR<>: " max ")" }
} else if ($1 == "string") {
- if (length(value) > max) { valid = 0; verr = "@TR<> (@TR<>: " max ")" }
+ if (length(value) > max) { valid = 0; verr = "@TR<> (@TR<>: " max ")" }
}
} else if ((options[i] == "nodots") && ($1 == "hostname")) {
if (value ~ /\./) {
@@ -162,7 +173,7 @@
valid_type == 1 {
if (valid == 1) output = output $2 "=\"" value "\";\n"
- else error = error "Error in " $3 ": " verr " "
+ else error = error "@TR<> " $3 ": " verr " "
}
END {
@@ -170,3 +181,5 @@
if (error == "") print "return 0"
else print "return 255"
}
+
+
diff -r -u 0.7.0.4/usr/lib/webif/webif.sh 0.7.1.1/usr/lib/webif/webif.sh
--- 0.7.0.4/usr/lib/webif/webif.sh 2006-09-01 00:32:13.000000000 +0900
+++ 0.7.1.1/usr/lib/webif/webif.sh 2006-11-15 02:44:26.000000000 +0900
@@ -42,7 +42,7 @@
header() {
local title="$1"
-
+
empty "$ERROR" && {
_saved_title="${SAVED:+: @TR<>}"
} || {
@@ -72,98 +72,108 @@
-
-
-
+
+
+
-
+
@@ -238,7 +248,7 @@
export cfgfile="${cfg##*config-}"
export updatestr=
. $cfg
-
+
lock /tmp/.webif/update-$cfgfile
awk \
-v cfgfile="/etc/config/$cfgfile" \
@@ -257,3 +267,5 @@
lock -u /tmp/.webif/update-$cfgfile
done
)}
+
+
diff -r -u 0.7.0.4/www/cgi-bin/splash.sh 0.7.1.1/www/cgi-bin/splash.sh
--- 0.7.0.4/www/cgi-bin/splash.sh 2006-09-01 00:32:13.000000000 +0900
+++ 0.7.1.1/www/cgi-bin/splash.sh 2006-11-15 02:44:25.000000000 +0900
@@ -1,11 +1,11 @@
#!/usr/bin/webif-page
-
+
. /usr/lib/webif/webif.sh
header "No_network|No network access"
cat <@TR<>
- @TR<Fonera was not able to configure itself to your home network settings. This can be due to many different reasons:>>
+ @TR<Fonera was not able to configure itself to your home network settings. This can be due to many different reasons:>>