Merge branch 'fifteen' of ssh://git.ipfire.org/pub/git/ipfire-2.x into firewall-fifteen

This commit is contained in:
Alexander Marx
2013-10-05 13:31:22 +02:00
47 changed files with 1540 additions and 10356 deletions

View File

@@ -126,7 +126,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
$errormessage = $Lang::tr{'invalid ip'}." / ".$Lang::tr{'invalid netmask'};
}
if ($settings{'IP'} =~ /0.0.0.0/){
if ($settings{'IP'} =~ /^0\.0\.0\.0/){
$errormessage = $Lang::tr{'invalid ip'}." - 0.0.0.0";
}

View File

@@ -108,6 +108,7 @@ $settings{'TOR_RELAY_ENABLED'} = 'off';
$settings{'TOR_RELAY_MODE'} = 'exit';
$settings{'TOR_RELAY_ADDRESS'} = '';
$settings{'TOR_RELAY_PORT'} = 9001;
$settings{'TOR_RELAY_DIRPORT'} = 0;
$settings{'TOR_RELAY_NICKNAME'} = '';
$settings{'TOR_RELAY_CONTACT_INFO'} = '';
$settings{'TOR_RELAY_BANDWIDTH_RATE'} = 0;
@@ -143,6 +144,11 @@ if ($settings{'ACTION'} eq $Lang::tr{'save'}) {
if (!&General::validport($settings{'TOR_RELAY_PORT'})) {
$errormessage = "$Lang::tr{'tor errmsg invalid relay port'}: $settings{'TOR_RELAY_PORT'}";
}
if ($settings{'TOR_RELAY_DIRPORT'} ne '0') {
if (!&General::validport($settings{'TOR_RELAY_DIRPORT'})) {
$errormessage = "$Lang::tr{'tor errmsg invalid directory port'}: $settings{'TOR_RELAY_DIRPORT'}";
}
}
if ($settings{'TOR_RELAY_ADDRESS'} ne '') {
if ((!&General::validfqdn($settings{'TOR_RELAY_ADDRESS'})) && (!&General::validip($settings{'TOR_RELAY_ADDRESS'}))) {
@@ -382,7 +388,7 @@ END
</td>
<td width='25%' class='base'>$Lang::tr{'tor relay nickname'}:&nbsp;<img src='/blob.gif' alt='*' /></td>
<td width='20%'>
<input type='text' name='TOR_RELAY_NICKNAME' value='$settings{'TOR_RELAY_NICKNAME'}' />
<input type='text' name='TOR_RELAY_NICKNAME' value='$settings{'TOR_RELAY_NICKNAME'}' maxlength='19' />
</td>
</tr>
<tr>
@@ -395,6 +401,14 @@ END
<input type='text' name='TOR_RELAY_PORT' value='$settings{'TOR_RELAY_PORT'}' size='5' />
</td>
</tr>
<tr>
<td width='25%'>&nbsp;</td>
<td width='30%'>&nbsp;</td>
<td width='25%' class='base'>$Lang::tr{'tor directory port'}:</td>
<td width='20%'>
<input type='text' name='TOR_RELAY_DIRPORT' value='$settings{'TOR_RELAY_DIRPORT'}' size='5' />&nbsp;$Lang::tr{'tor 0 = disabled'}
</td>
</tr>
<tr>
<td width='25%' class='base'>$Lang::tr{'tor contact info'}:&nbsp;<img src='/blob.gif' alt='*' /></td>
<td width='75%' colspan='3'>
@@ -607,7 +621,7 @@ END
END
if (exists($node->{'country_code'})) {
if ($node->{'country_code'} eq '??') {
if (!$node->{'country_code'} or $node->{'country_code'} eq '??') {
print "<img src='/images/flags/blank.png' border='0' align='absmiddle'/>";
} else {
print "<a href='country.cgi#$node->{'country_code'}'><img src='/images/flags/$node->{'country_code'}.png' border='0' align='absmiddle' alt='$node->{'country_code'}'></a>";
@@ -683,6 +697,10 @@ sub BuildConfiguration() {
print FILE "ORPort $settings{'TOR_RELAY_PORT'}\n";
if ($settings{'TOR_RELAY_DIRPORT'} ne '0') {
print FILE "DirPort $settings{'TOR_RELAY_DIRPORT'}\n";
}
if ($settings{'TOR_RELAY_ADDRESS'} ne '') {
print FILE "Address $settings{'TOR_RELAY_ADDRESS'}\n";
}

View File

@@ -2,7 +2,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2012 IPFire Team <info@ipfire.org> #
# Copyright (C) 2012-2013 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@@ -446,7 +446,7 @@ sub showEditBox() {
<table width='100%'>
<tr>
<td class='base' width='20%'>$Lang::tr{'wlan client ssid'}:</td>
<td width='40%'><input type='text' name='SSID' value='$settings{'SSID'}' size='25'/></td>
<td width='40%'><input type='text' name='SSID' value=$settings{'SSID'} size='25'/></td>
<td class='base' width='10%'>$Lang::tr{'enabled'}</td>
<td width='30%'><input type='checkbox' name='ENABLED' $checked{'ENABLED'} /></td>
</tr>
@@ -464,7 +464,7 @@ sub showEditBox() {
</tr>
<tr>
<td class='base' width='20%'>$Lang::tr{'wlan client psk'}:&nbsp;</td>
<td width='40%'><input type='password' name='PSK' value='$settings{'PSK'}' size='25'/></td>
<td width='40%'><input type='password' name='PSK' value=$settings{'PSK'} size='25'/></td>
<td colspan="2" width='40%'></td>
</tr>
</table>
@@ -499,11 +499,11 @@ sub showEditBox() {
</td>
<td width='40%'>
<select name='PRIO'>
<option value="0" $selected{'PRIO'}{'0'}>0</option>
<option value="0" $selected{'PRIO'}{'0'}>0 ($Lang::tr{'most preferred'})</option>
<option value="1" $selected{'PRIO'}{'1'}>1</option>
<option value="2" $selected{'PRIO'}{'2'}>2</option>
<option value="3" $selected{'PRIO'}{'3'}>3</option>
<option value="4" $selected{'PRIO'}{'4'}>4</option>
<option value="4" $selected{'PRIO'}{'4'}>4 ($Lang::tr{'least preferred'})</option>
</select>
</td>
<td colspan="2" width='40%'></td>