summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/bin/beep.sh6
-rwxr-xr-xusr/local/www/diag_defaults.php2
-rwxr-xr-xusr/local/www/diag_logs_settings.php244
-rwxr-xr-xusr/local/www/exec.php2
-rwxr-xr-xusr/local/www/firewall_rules.php8
-rwxr-xr-xusr/local/www/guiconfig.inc9
-rwxr-xr-xusr/local/www/halt.php2
-rwxr-xr-xusr/local/www/interfaces.php52
-rwxr-xr-xusr/local/www/interfaces_assign.php2
-rwxr-xr-xusr/local/www/load_balancer_setting.php25
-rwxr-xr-xusr/local/www/reboot.php4
-rwxr-xr-xusr/local/www/services_dhcp.php40
-rw-r--r--usr/local/www/services_dhcpv6.php78
-rwxr-xr-xusr/local/www/services_dyndns.php3
-rw-r--r--usr/local/www/services_dyndns_edit.php12
-rwxr-xr-xusr/local/www/status_dhcp_leases.php21
-rw-r--r--usr/local/www/status_dhcpv6_leases.php19
-rwxr-xr-xusr/local/www/status_interfaces.php16
-rwxr-xr-xusr/local/www/system.php24
-rw-r--r--usr/local/www/system_advanced_admin.php2
-rw-r--r--usr/local/www/system_advanced_notifications.php29
-rw-r--r--usr/local/www/system_certmanager.php2
-rwxr-xr-xusr/local/www/system_gateways_edit.php14
-rwxr-xr-xusr/local/www/system_routes.php17
-rwxr-xr-xusr/local/www/system_routes_edit.php13
25 files changed, 442 insertions, 204 deletions
diff --git a/usr/local/bin/beep.sh b/usr/local/bin/beep.sh
index 6f4e477..0158244 100755
--- a/usr/local/bin/beep.sh
+++ b/usr/local/bin/beep.sh
@@ -1,5 +1,11 @@
#!/bin/sh
+
+BEEP=`/usr/bin/grep -c disablebeep /conf/config.xml`
+if [ $BEEP -gt 0 ]; then
+ exit;
+fi
+
# Standard note length
NOTELENGTH="25"
diff --git a/usr/local/www/diag_defaults.php b/usr/local/www/diag_defaults.php
index 612e02a..86ea6f9 100755
--- a/usr/local/www/diag_defaults.php
+++ b/usr/local/www/diag_defaults.php
@@ -48,7 +48,7 @@ if ($_POST) {
if ($_POST['Submit'] != " No ") {
reset_factory_defaults();
system_reboot();
- $rebootmsg = gettext("The system has been reset to factory defaults and is now rebooting. This may take one minute.");
+ $rebootmsg = gettext("The system has been reset to factory defaults and is now rebooting. This may take a few minutes, depending on your hardware.");
} else {
header("Location: index.php");
exit;
diff --git a/usr/local/www/diag_logs_settings.php b/usr/local/www/diag_logs_settings.php
index 44a682c..be34612 100755
--- a/usr/local/www/diag_logs_settings.php
+++ b/usr/local/www/diag_logs_settings.php
@@ -31,7 +31,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
+/*
pfSense_MODULE: system
*/
@@ -69,23 +69,27 @@ $pconfig['disablelocallogging'] = isset($config['syslog']['disablelocallogging']
if (!$pconfig['nentries'])
$pconfig['nentries'] = 50;
+function is_valid_syslog_server($target) {
+ return (is_ipaddr($target)
+ || is_ipaddrwithport($target)
+ || is_hostname($target)
+ || is_hostnamewithport($target));
+}
+
if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
/* input validation */
- if ($_POST['enable'] && !is_ipaddr($_POST['remoteserver'])) {
- $input_errors[] = gettext("A valid IP address must be specified for remote syslog server #1.");
- }
- if ($_POST['enable'] && $_POST['remoteserver2'] && !is_ipaddr($_POST['remoteserver2'])) {
- $input_errors[] = gettext("A valid IP address must be specified for remote syslog server #2.");
+ if ($_POST['enable'] && !is_valid_syslog_server($_POST['remoteserver'])) {
+ $input_errors[] = gettext("A valid IP address/hosname or IP/hostname:port must be specified for remote syslog server #1.");
}
- if ($_POST['enable'] && $_POST['remoteserver3'] && !is_ipaddr($_POST['remoteserver3'])) {
- $input_errors[] = gettext("A valid IP address must be specified for remote syslog server #3.");
+ if ($_POST['enable'] && $_POST['remoteserver2'] && !is_valid_syslog_server($_POST['remoteserver2'])) {
+ $input_errors[] = gettext("A valid IP address/hosname or IP/hostname:port must be specified for remote syslog server #2.");
}
- if ($_POST['enable'] && !is_ipaddr($_POST['remoteserver'])) {
- $input_errors[] = gettext("A valid IP address must be specified.");
+ if ($_POST['enable'] && $_POST['remoteserver3'] && !is_valid_syslog_server($_POST['remoteserver3'])) {
+ $input_errors[] = gettext("A valid IP address/hosname or IP/hostname:port must be specified for remote syslog server #3.");
}
if (($_POST['nentries'] < 5) || ($_POST['nentries'] > 2000)) {
@@ -105,7 +109,7 @@ if ($_POST) {
$config['syslog']['apinger'] = $_POST['apinger'] ? true : false;
$config['syslog']['relayd'] = $_POST['relayd'] ? true : false;
$config['syslog']['hostapd'] = $_POST['hostapd'] ? true : false;
- $config['syslog']['logall'] = $_POST['logall'] ? true : false;
+ $config['syslog']['logall'] = $_POST['logall'] ? true : false;
$config['syslog']['system'] = $_POST['system'] ? true : false;
$config['syslog']['disablelocallogging'] = $_POST['disablelocallogging'] ? true : false;
$config['syslog']['enable'] = $_POST['enable'] ? true : false;
@@ -204,7 +208,7 @@ function check_everything() {
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr><td>
+<tr><td>
<?php
$tab_array = array();
$tab_array[] = array(gettext("System"), false, "diag_logs.php");
@@ -221,118 +225,120 @@ function check_everything() {
$tab_array[] = array(gettext("Settings"), true, "diag_logs_settings.php");
display_top_tabs($tab_array);
?>
- </td></tr>
- <tr>
- <td>
+</td></tr>
+<tr>
+ <td>
<div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td width="22%" valign="top" class="vtable">&nbsp;</td>
- <td width="78%" class="vtable"> <input name="reverse" type="checkbox" id="reverse" value="yes" <?php if ($pconfig['reverse']) echo "checked"; ?>>
+ <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
+ <tr>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("General Logging Options");?></td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vtable">Forward/Reverse Display</td>
+ <td width="78%" class="vtable"> <input name="reverse" type="checkbox" id="reverse" value="yes" <?php if ($pconfig['reverse']) echo "checked"; ?>>
<strong><?=gettext("Show log entries in reverse order (newest entries on top)");?></strong></td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vtable">&nbsp;</td>
- <td width="78%" class="vtable"><?=gettext("Number of log entries to show:")?>
- <input name="nentries" id="nentries" type="text" class="formfld unknown" size="4" value="<?=htmlspecialchars($pconfig['nentries']);?>"></td>
- </tr>
- <tr>
- <td valign="top" class="vtable">&nbsp;</td>
- <td class="vtable"> <input name="logdefaultblock" type="checkbox" id="logdefaultblock" value="yes" <?php if ($pconfig['logdefaultblock']) echo "checked"; ?>>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vtable">GUI Log Entries to Display</td>
+ <td width="78%" class="vtable">
+ <input name="nentries" id="nentries" type="text" class="formfld unknown" size="4" value="<?=htmlspecialchars($pconfig['nentries']);?>"><br/>
+ <?=gettext("Hint: This is only the number of log entries displayed in the GUI. It does not affect how many entries are contained in the actual log files.") ?></td>
+ </tr>
+ <tr>
+ <td valign="top" class="vtable">Log Firewall Default Blocks</td>
+ <td class="vtable"> <input name="logdefaultblock" type="checkbox" id="logdefaultblock" value="yes" <?php if ($pconfig['logdefaultblock']) echo "checked"; ?>>
<strong><?=gettext("Log packets blocked by the default rule");?></strong><br>
- <?=gettext("Hint: packets that are blocked by the " .
- "implicit default block rule will not be logged anymore " .
- "if you uncheck this option. Per-rule logging options are not affected.");?></td>
- </tr>
- <tr>
- <td valign="top" class="vtable">&nbsp;</td>
- <td class="vtable"> <input name="rawfilter" type="checkbox" id="rawfilter" value="yes" <?php if ($pconfig['rawfilter']) echo "checked"; ?>>
+ <?=gettext("Hint: packets that are blocked by the " .
+ "implicit default block rule will not be logged " .
+ "if you uncheck this option. Per-rule logging options are still respected.");?></td>
+ </tr>
+ <tr>
+ <td valign="top" class="vtable">Raw Logs</td>
+ <td class="vtable"> <input name="rawfilter" type="checkbox" id="rawfilter" value="yes" <?php if ($pconfig['rawfilter']) echo "checked"; ?>>
<strong><?=gettext("Show raw filter logs");?></strong><br>
- <?=gettext("Hint: If this is checked, filter logs are shown as generated by the packet filter, without any formatting. This will reveal more detailed information.");?></td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vtable">&nbsp;</td>
- <td width="78%" class="vtable"> <input name="disablelocallogging" type="checkbox" id="disablelocallogging" value="yes" <?php if ($pconfig['disablelocallogging']) echo "checked"; ?> onClick="enable_change(false)">
- <strong><?=gettext("Disable writing log files to the local RAM disk");?></strong></td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vtable">&nbsp;</td>
- <td width="78%" class="vtable"> <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false)">
- <strong><?=gettext("Enable syslog'ing to remote syslog server");?></strong></td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Remote syslog servers");?></td>
- <td width="78%" class="vtable">
- <table>
- <tr>
- <td>
- <?=gettext("Server") . " 1";?>
- </td>
- <td>
- <input name="remoteserver" id="remoteserver" type="text" class="formfld host" size="20" value="<?=htmlspecialchars($pconfig['remoteserver']);?>">
- </td>
- </tr>
- <tr>
- <td>
- <?=gettext("Server") . " 2";?>
- </td>
- <td>
- <input name="remoteserver2" id="remoteserver2" type="text" class="formfld host" size="20" value="<?=htmlspecialchars($pconfig['remoteserver2']);?>">
- </td>
- </tr>
- <tr>
- <td>
- <?=gettext("Server") . " 3";?>
- </td>
- <td>
- <input name="remoteserver3" id="remoteserver3" type="text" class="formfld host" size="20" value="<?=htmlspecialchars($pconfig['remoteserver3']);?>">
- </td>
- </tr>
- <tr>
- <td>
- &nbsp;
- </td>
- <td>
- <?=gettext("IP addresses of remote syslog servers");?>
- </td>
- </table>
- <input name="system" id="system" type="checkbox" value="yes" onclick="enable_change(false)" <?php if ($pconfig['system']) echo "checked"; ?>>
- <?=gettext("System events");?><br>
- <input name="filter" id="filter" type="checkbox" value="yes" <?php if ($pconfig['filter']) echo "checked"; ?>>
- <?=gettext("Firewall events");?><br>
- <input name="dhcp" id="dhcp" type="checkbox" value="yes" <?php if ($pconfig['dhcp']) echo "checked"; ?>>
- <?=gettext("DHCP service events");?><br>
- <input name="portalauth" id="portalauth" type="checkbox" value="yes" <?php if ($pconfig['portalauth']) echo "checked"; ?>>
- <?=gettext("Portal Auth events");?><br>
- <input name="vpn" id="vpn" type="checkbox" value="yes" <?php if ($pconfig['vpn']) echo "checked"; ?>>
- <?=gettext("VPN (PPTP, IPsec, OpenVPN) events");?><br>
- <input name="apinger" id="apinger" type="checkbox" value="yes" <?php if ($pconfig['apinger']) echo "checked"; ?>>
- <?=gettext("Gateway Monitor events");?><br>
- <input name="relayd" id="relayd" type="checkbox" value="yes" <?php if ($pconfig['relayd']) echo "checked"; ?>>
- <?=gettext("Server Load Balancer events");?><br>
- <input name="hostapd" id="hostapd" type="checkbox" value="yes" <?php if ($pconfig['hostapd']) echo "checked"; ?>>
- <?=gettext("Wireless events");?><br>
- <br> <input name="logall" id="logall" type="checkbox" value="yes" <?php if ($pconfig['logall']) echo "checked"; ?> onclick="check_everything();">
- <?=gettext("Everything");?>
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top">&nbsp;</td>
- <td width="78%"> <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)">
- </td>
- </tr>
- <tr>
- <td width="22%" height="53" valign="top">&nbsp;</td>
- <td width="78%"><strong><span class="red"><?=gettext("Note:")?></span></strong><br>
- <?=gettext("syslog sends UDP datagrams to port 514 on the specified " .
- "remote syslog server. Be sure to set syslogd on the " .
- "remote server to accept syslog messages from");?> <?=$g['product_name']?>.
- </td>
- </tr>
- </table>
+ <?=gettext("Hint: If this is checked, filter logs are shown as generated by the packet filter, without any formatting. This will reveal more detailed information, but it is more difficult to read.");?></td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vtable">Local Logging</td>
+ <td width="78%" class="vtable"> <input name="disablelocallogging" type="checkbox" id="disablelocallogging" value="yes" <?php if ($pconfig['disablelocallogging']) echo "checked"; ?> onClick="enable_change(false)">
+ <?php if ($g['platform'] == "pfSense"): ?>
+ <strong><?=gettext("Disable writing log files to the local disk");?></strong></td>
+ <?php else: ?>
+ <strong><?=gettext("Disable writing log files to the local RAM disk");?></strong></td>
+ <?php endif; ?>
+ </tr>
+ <tr>
+ <td colspan="2" valign="top">&nbsp;</td>
+ </tr>
+ <tr>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Remote Logging Options");?></td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Enable Remote Logging");?></td>
+ <td width="78%" class="vtable"> <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false)">
+ <strong><?=gettext("Send log messages to remote syslog server");?></strong></td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Remote Syslog Servers");?></td>
+ <td width="78%" class="vtable">
+ <table>
+ <tr>
+ <td><?=gettext("Server") . " 1";?></td>
+ <td><input name="remoteserver" id="remoteserver" type="text" class="formfld host" size="20" value="<?=htmlspecialchars($pconfig['remoteserver']);?>"></td>
+ </tr>
+ <tr>
+ <td><?=gettext("Server") . " 2";?></td>
+ <td><input name="remoteserver2" id="remoteserver2" type="text" class="formfld host" size="20" value="<?=htmlspecialchars($pconfig['remoteserver2']);?>"></td>
+ </tr>
+ <tr>
+ <td><?=gettext("Server") . " 3";?></td>
+ <td><input name="remoteserver3" id="remoteserver3" type="text" class="formfld host" size="20" value="<?=htmlspecialchars($pconfig['remoteserver3']);?>"></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td><?=gettext("IP addresses of remote syslog servers, or an IP:port.");?></td>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Remote Syslog Contents");?></td>
+ <td width="78%" class="vtable">
+ <input name="logall" id="logall" type="checkbox" value="yes" <?php if ($pconfig['logall']) echo "checked"; ?> onclick="check_everything();">
+ <?=gettext("Everything");?><br/><br/>
+ <input name="system" id="system" type="checkbox" value="yes" onclick="enable_change(false)" <?php if ($pconfig['system']) echo "checked"; ?>>
+ <?=gettext("System events");?><br/>
+ <input name="filter" id="filter" type="checkbox" value="yes" <?php if ($pconfig['filter']) echo "checked"; ?>>
+ <?=gettext("Firewall events");?><br/>
+ <input name="dhcp" id="dhcp" type="checkbox" value="yes" <?php if ($pconfig['dhcp']) echo "checked"; ?>>
+ <?=gettext("DHCP service events");?><br/>
+ <input name="portalauth" id="portalauth" type="checkbox" value="yes" <?php if ($pconfig['portalauth']) echo "checked"; ?>>
+ <?=gettext("Portal Auth events");?><br/>
+ <input name="vpn" id="vpn" type="checkbox" value="yes" <?php if ($pconfig['vpn']) echo "checked"; ?>>
+ <?=gettext("VPN (PPTP, IPsec, OpenVPN) events");?><br/>
+ <input name="apinger" id="apinger" type="checkbox" value="yes" <?php if ($pconfig['apinger']) echo "checked"; ?>>
+ <?=gettext("Gateway Monitor events");?><br/>
+ <input name="relayd" id="relayd" type="checkbox" value="yes" <?php if ($pconfig['relayd']) echo "checked"; ?>>
+ <?=gettext("Server Load Balancer events");?><br/>
+ <input name="hostapd" id="hostapd" type="checkbox" value="yes" <?php if ($pconfig['hostapd']) echo "checked"; ?>>
+ <?=gettext("Wireless events");?><br/>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top">&nbsp;</td>
+ <td width="78%"> <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)">
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" height="53" valign="top">&nbsp;</td>
+ <td width="78%"><strong><span class="red"><?=gettext("Note:")?></span></strong><br>
+ <?=gettext("syslog sends UDP datagrams to port 514 on the specified " .
+ "remote syslog server, unless another port is specified. Be sure to set syslogd on the " .
+ "remote server to accept syslog messages from");?> <?=$g['product_name']?>.
+ </td>
+ </tr>
+ </table>
</div>
- </td>
- </tr>
+</td></tr>
</table>
</form>
<script language="JavaScript">
diff --git a/usr/local/www/exec.php b/usr/local/www/exec.php
index e9b0259..8dfd73d 100755
--- a/usr/local/www/exec.php
+++ b/usr/local/www/exec.php
@@ -230,7 +230,7 @@ if (!isBlank($_POST['txtCommand'])) {
puts("\$ " . htmlspecialchars($_POST['txtCommand']));
putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin");
putenv("SCRIPT_FILENAME=" . strtok($_POST['txtCommand'], " ")); /* PHP scripts */
- $ph = popen($_POST['txtCommand'], "r" );
+ $ph = popen($_POST['txtCommand'] . ' 2>&1', "r" );
while ($line = fgets($ph)) echo htmlspecialchars($line);
pclose($ph);
puts("</pre>");
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php
index 49b3e7c..e68cd16 100755
--- a/usr/local/www/firewall_rules.php
+++ b/usr/local/www/firewall_rules.php
@@ -789,8 +789,12 @@ if($_REQUEST['undodrag']) {
<td class="listt"></td>
<td class="listlr" colspan="10" align="center" valign="middle">
<span class="gray">
- <?=gettext("No rules are currently defined for this interface"); ?><br>
- <?=gettext("All incoming connections on this interface will be blocked until you add pass rules."); ?><br><br>
+ <?php if ($_REQUEST['if'] == "FloatingRules"): ?>
+ <?=gettext("No floating rules are currently defined."); ?><br/><br/>
+ <?php else: ?>
+ <?=gettext("No rules are currently defined for this interface"); ?><br/>
+ <?=gettext("All incoming connections on this interface will be blocked until you add pass rules."); ?><br/><br/>
+ <?php endif; ?>
<?=gettext("Click the"); ?> <a href="firewall_rules_edit.php?if=<?=htmlspecialchars($if);?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add new rule");?>" border="0" width="17" height="17" align="absmiddle"></a><?=gettext(" button to add a new rule.");?></span>
</td>
<?php endif; ?>
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc
index 684d531..cbdcb9a 100755
--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -78,6 +78,15 @@ foreach($apple_ua as $useragent)
if(strstr($_SERVER['HTTP_USER_AGENT'], $useragent))
$g['theme'] = "pfsense";
+/* Set the default interface language */
+if($config['system']['language'] <> "") {
+ $g['language'] = $config['system']['language'];
+} elseif ($g['language'] == "") {
+ $g['language'] = 'en_US';
+}
+
+set_language($g['language']);
+
/* used by progress bar */
$lastseen = "-1";
diff --git a/usr/local/www/halt.php b/usr/local/www/halt.php
index 1bfda93..ae69291 100755
--- a/usr/local/www/halt.php
+++ b/usr/local/www/halt.php
@@ -49,7 +49,7 @@ require("captiveportal.inc");
if ($_POST) {
if ($_POST['Submit'] != " No ") {
system_halt();
- $rebootmsg = gettext("The system is halting now. This may take one minute.");
+ $rebootmsg = gettext("The system is halting now. This may take a few minutes, depending on your hardware.");
} else {
header("Location: index.php");
exit;
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index c3745b3..f72218d 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -222,9 +222,9 @@ switch($wancfg['ipaddrv6']) {
break;
case "6rd":
$pconfig['prefix-6rd'] = $wancfg['prefix-6rd'];
- if($wancfg['prefix-6rd-len'] == "")
- $wancfg['prefix-6rd-len'] = "0";
- $pconfig['prefix-6rd-len'] = $wancfg['prefix-6rd-len'];
+ if($wancfg['prefix-6rd-v4plen'] == "")
+ $wancfg['prefix-6rd-v4plen'] = "0";
+ $pconfig['prefix-6rd-v4plen'] = $wancfg['prefix-6rd-v4plen'];
$pconfig['type6'] = "6rd";
$pconfig['gateway-6rd'] = $wancfg['gateway-6rd'];
break;
@@ -562,9 +562,11 @@ if ($_POST['apply']) {
/* Wireless interface? */
if (isset($wancfg['wireless'])) {
$reqdfields = array("mode");
- if($_POST['mode'] == 'hostap')
- array_push($reqdfields, "ssid");
- $reqdfieldsn = array(gettext("Mode"),gettext("SSID"));
+ $reqdfieldsn = array(gettext("Mode"));
+ if ($_POST['mode'] == 'hostap') {
+ $reqdfields[] = "ssid";
+ $reqdfieldsn[] = gettext("SSID");
+ }
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
check_wireless_mode();
/* loop through keys and enforce size */
@@ -639,7 +641,7 @@ if ($_POST['apply']) {
unset($wancfg['dhcp6-duid']);
unset($wancfg['dhcp6-ia-pd-len']);
unset($wancfg['prefix-6rd']);
- unset($wancfg['prefix-6rd-len']);
+ unset($wancfg['prefix-6rd-v4plen']);
unset($wancfg['gateway-6rd']);
unset($wancfg['prefix-6rd-id']);
unset($wancfg['pppoe_password']);
@@ -808,7 +810,7 @@ if ($_POST['apply']) {
case "6rd":
$wancfg['ipaddrv6'] = "6rd";
$wancfg['prefix-6rd'] = $_POST['prefix-6rd'];
- $wancfg['prefix-6rd-len'] = $_POST['prefix-6rd-len'];
+ $wancfg['prefix-6rd-v4plen'] = $_POST['prefix-6rd-v4plen'];
$wancfg['gateway-6rd'] = $_POST['gateway-6rd'];
if($gateway_item) {
$a_gateways[] = $gateway_item;
@@ -1066,7 +1068,7 @@ $statusurl = "status_interfaces.php";
$closehead = false;
include("head.inc");
$types4 = array("none" => gettext("None"), "staticv4" => gettext("Static IPv4"), "dhcp" => gettext("DHCP"), "ppp" => gettext("PPP"), "pppoe" => gettext("PPPoE"), "pptp" => gettext("PPTP"), "l2tp" => gettext("L2TP") /* , "carpdev-dhcp" => "CarpDev"*/);
-$types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"), "dhcp6" => gettext("DHCP6"), "6rd" => gettext("6RD"));
+$types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"), "dhcp6" => gettext("DHCP6"), "srd" => gettext("6RD"));
?>
@@ -1112,19 +1114,19 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
function updateTypeSix(t) {
switch(t) {
case "none": {
- jQuery('#staticv6, #dhcp6', '#6rd').hide();
+ jQuery('#staticv6, #dhcp6', '#srd').hide();
break;
}
case "staticv6": {
- jQuery('#none, #dhcp6', '#6rd').hide();
+ jQuery('#none, #dhcp6', '#srd').hide();
break;
}
case "dhcp6": {
- jQuery('#none, #staticv6', '#6rd').hide();
+ jQuery('#none, #staticv6', '#srd').hide();
break;
}
- case "6rd": {
+ case "srd": {
jQuery('#none, #dhcp6', '#staticv6').hide();
break;
@@ -1641,8 +1643,8 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
<?php
// Needs to check if the ID is not used on another interface
foreach($ifdescrs as $rdif => $rddescr) {
- if(is_numeric($config['interfaces'][$rdif]['prefix-6rd-len'])) {
- $rdlen = $config['interfaces'][$rdif]['prefix-6rd-len'];
+ if(is_numeric($config['interfaces'][$rdif]['prefix-6rd-v4plen'])) {
+ $rdlen = $config['interfaces'][$rdif]['prefix-6rd-v4plen'];
continue;
}
}
@@ -1756,7 +1758,7 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
</table>
</td>
</tr>
- <tr style="display:none;" name="6rd" id="6rd">
+ <tr style="display:none;" name="srd" id="srd">
<td colspan="2" style="padding: 0px;">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
@@ -1771,7 +1773,7 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("6RD gateway"); ?></td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("6RD Border Relay"); ?></td>
<td width="78%" class="vtable">
<input name="gateway-6rd" type="text" class="formfld unknown" id="gateway-6rd" size="40" value="<?=htmlspecialchars($pconfig['gateway-6rd']);?>">
<br>
@@ -1779,21 +1781,19 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("6RD Prefix length"); ?></td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("6RD IPv4 Prefix length"); ?></td>
<td width="78%" class="vtable">
- <select name="prefix-6rd-len" class="formselect" id="prefix-6rd-len">
+ <select name="prefix-6rd-v4plen" class="formselect" id="prefix-6rd-v4plen">
<?php
- $sizes = array(16 => "48", 12 => "52", 8 => "56", 4 => "60", 2 => "62", 1 => "63", 0 => "64");
- rsort($sizes);
- foreach($sizes as $bits => $length) {
- echo "<option value=\"{$bits}\" ";
- if (is_numeric($pconfig['prefix-6rd-len']) && ($bits == $pconfig['prefix-6rd-len'])) echo "selected";
- echo ">" . $length . "</option>";
+ for ($i = 0; $i < 32; $i++) {
+ echo "<option value=\"{$i}\" ";
+ if (is_numeric($pconfig['prefix-6rd-v4plen']) && ($i == $pconfig['prefix-6rd-v4plen'])) echo "selected";
+ echo ">" . $i . " bits</option>";
}
?>
</select>
<br>
- <?=gettext("The value in this field is the 6RD prefix length. Normally specified by the ISP. A value of 0 for a single subnet is safe."); ?>
+ <?=gettext("The value in this field is the 6RD IPv4 prefix length. Normally specified by the ISP. A value of 0 means we embed the entire IPv4 address in the 6RD prefix."); ?>
</td>
</tr>
diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php
index f518b76..d8f5511 100755
--- a/usr/local/www/interfaces_assign.php
+++ b/usr/local/www/interfaces_assign.php
@@ -428,7 +428,7 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed"))
$ifdescr = strtoupper($ifname);
?>
<tr>
- <td class="listlr" valign="middle"><strong><?=$ifdescr;?></strong></td>
+ <td class="listlr" valign="middle"><strong><u><span onclick="location.href='/interfaces.php?if=<?=$ifname;?>'" style="cursor: pointer;"><?=$ifdescr;?></span></strong></td>
<td valign="middle" class="listr">
<select onChange="javascript:jQuery('#savediv').show();" name="<?=$ifname;?>" id="<?=$ifname;?>">
<?php foreach ($portlist as $portname => $portinfo): ?>
diff --git a/usr/local/www/load_balancer_setting.php b/usr/local/www/load_balancer_setting.php
index 479b2d0..ffe7625 100755
--- a/usr/local/www/load_balancer_setting.php
+++ b/usr/local/www/load_balancer_setting.php
@@ -70,13 +70,24 @@ if ($_POST) {
}
if ($_POST['interval'] && !is_numeric($_POST['interval'])) {
- $input_errors[] = gettext("Interval must be a numeric value");
+ $input_errors[] = gettext("Interval must be a numeric value");
}
+ if ($_POST['prefork']) {
+ if (!is_numeric($_POST['prefork'])) {
+ $input_errors[] = gettext("Prefork must be a numeric value");
+ } else {
+ if (($_POST['prefork']<=0) || ($_POST['prefork']>32)) {
+ $input_errors[] = gettext("Prefork value must be between 1 and 32");
+ }
+ }
+ }
+
/* update config if user entry is valid */
if (!$input_errors) {
$lbsetting['timeout'] = $_POST['timeout'];
$lbsetting['interval'] = $_POST['interval'];
+ $lbsetting['prefork'] = $_POST['prefork'];
write_config();
mark_subsystem_dirty('loadbalancer');
@@ -121,7 +132,7 @@ include("head.inc");
<td colspan="2" valign="top" class="listtopic"><?=gettext("Relayd global settings"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Pool member timeout") ; ?></td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("timeout") ; ?></td>
<td width="78%" class="vtable">
<input name="timeout" id="timeout" value="<?php if ($lbsetting['timeout'] <> "") echo $lbsetting['timeout']; ?>" class="formfld unknown">
<br />
@@ -129,13 +140,21 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Pool member check interval") ; ?></td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("interval") ; ?></td>
<td width="78%" class="vtable">
<input name="interval" id="interval" value="<?php if ($lbsetting['interval'] <> "") echo $lbsetting['interval']; ?>" class="formfld unknown">
<br />
<?=gettext("Set the interval in seconds at which the member of a pool will be checked. Leave blank to use the default interval of 10 seconds"); ?>
</td>
</tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("prefork") ; ?></td>
+ <td width="78%" class="vtable">
+ <input name="prefork" id="prefork" value="<?php if ($lbsetting['prefork'] <> "") echo $lbsetting['prefork']; ?>" class="formfld unknown">
+ <br />
+ <?=gettext("Number of processes used by relayd. Leave blank to use the default value of 5 processes"); ?>
+ </td>
+ </tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
diff --git a/usr/local/www/reboot.php b/usr/local/www/reboot.php
index 07faa19..3f7eeda 100755
--- a/usr/local/www/reboot.php
+++ b/usr/local/www/reboot.php
@@ -42,7 +42,7 @@ require("captiveportal.inc");
if ($_POST) {
if ($_POST['Submit'] == gettext(" Yes ")) {
- $rebootmsg = gettext("The system is rebooting now. This may take one minute.");
+ $rebootmsg = gettext("The system is rebooting now. This may take a few minutes, depending on your hardware.");
} else {
Header("Location: /");
}
@@ -73,7 +73,7 @@ if ($_POST) {
if ($_POST['Submit'] == $reply) {
echo "<meta http-equiv=\"refresh\" content=\"70;url=/\">";
system_reboot();
- $rebootmsg = gettext("The system is rebooting now. This may take one minute.");
+ $rebootmsg = gettext("The system is rebooting now. This may take a few minutes, depending on your hardware.");
} else {
exit;
}
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php
index 77a20e5..3895268 100755
--- a/usr/local/www/services_dhcp.php
+++ b/usr/local/www/services_dhcp.php
@@ -151,6 +151,7 @@ if (is_array($config['dhcpd'][$if])){
$pconfig['failover_peerip'] = $config['dhcpd'][$if]['failover_peerip'];
$pconfig['netmask'] = $config['dhcpd'][$if]['netmask'];
$pconfig['numberoptions'] = $config['dhcpd'][$if]['numberoptions'];
+ $pconfig['dhcpleaseinlocaltime'] = $config['dhcpd'][$if]['dhcpleaseinlocaltime'];
if (!is_array($config['dhcpd'][$if]['staticmap']))
$config['dhcpd'][$if]['staticmap'] = array();
$a_maps = &$config['dhcpd'][$if]['staticmap'];
@@ -231,6 +232,16 @@ if ($_POST) {
$input_errors[] = gettext("The maximum lease time must be at least 60 seconds and higher than the default lease time.");
if (($_POST['ddnsdomain'] && !is_domain($_POST['ddnsdomain'])))
$input_errors[] = gettext("A valid domain name must be specified for the dynamic DNS registration.");
+ if ($_POST['domainsearchlist']) {
+ $domain_array=preg_split("/[ ;]+/",$_POST['domainsearchlist']);
+ foreach ($domain_array as $curdomain) {
+ if (!is_domain($curdomain)) {
+ $input_errors[] = gettext("A valid domain search list must be specified.");
+ break;
+ }
+ }
+ }
+
if (($_POST['ntp1'] && !is_ipaddrv4($_POST['ntp1'])) || ($_POST['ntp2'] && !is_ipaddrv4($_POST['ntp2'])))
$input_errors[] = gettext("A valid IP address must be specified for the primary/secondary NTP servers.");
if (($_POST['domain'] && !is_domain($_POST['domain'])))
@@ -370,6 +381,7 @@ if ($_POST) {
$config['dhcpd'][$if]['nextserver'] = $_POST['nextserver'];
$config['dhcpd'][$if]['filename'] = $_POST['filename'];
$config['dhcpd'][$if]['rootpath'] = $_POST['rootpath'];
+ $config['dhcpd'][$if]['dhcpleaseinlocaltime'] = $_POST['dhcpleaseinlocaltime'];
// Handle the custom options rowhelper
if(isset($config['dhcpd'][$if]['numberoptions']['item']))
@@ -468,6 +480,7 @@ include("head.inc");
document.iform.domain.disabled = endis;
document.iform.domainsearchlist.disabled = endis;
document.iform.staticarp.disabled = endis;
+ document.iform.dhcpleaseinlocaltime.disabled = endis;
document.iform.ddnsdomain.disabled = endis;
document.iform.ddnsupdate.disabled = endis;
document.iform.ntp1.disabled = endis;
@@ -669,7 +682,7 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Domain search list");?></td>
<td width="78%" class="vtable">
<input name="domainsearchlist" type="text" class="formfld unknown" id="domainsearchlist" size="20" value="<?=htmlspecialchars($pconfig['domainsearchlist']);?>"><br>
- <?=gettext("The DHCP server can optionally provide a domain search list.");?>
+ <?=gettext("The DHCP server can optionally provide a domain search list. Use the semicolon character as seperator ");?>
</td>
</tr>
<tr>
@@ -719,6 +732,31 @@ include("head.inc");
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Time format change"); ?></td>
+ <td width="78%" class="vtable">
+ <table>
+ <tr>
+ <td>
+ <input name="dhcpleaseinlocaltime" type="checkbox" id="dhcpleaseinlocaltime" value="yes" <?php if ($pconfig['dhcpleaseinlocaltime']) echo "checked"; ?>>
+ </td>
+ <td>
+ <strong>
+ <?=gettext("Change DHCP display lease time from UTC to local time."); ?>
+ </strong>
+ </td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>
+ <span class="red"><strong><?=gettext("Note:");?></strong></span> <?=gettext("By default DHCP leases are displayed in UTC time. By checking this
+ box DHCP lease time will be displayed in local time and set to time zone selected. This will be used for all DHCP interfaces lease time."); ?>
+
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Dynamic DNS");?></td>
<td width="78%" class="vtable">
<div id="showddnsbox">
diff --git a/usr/local/www/services_dhcpv6.php b/usr/local/www/services_dhcpv6.php
index d18e15e..664652e 100644
--- a/usr/local/www/services_dhcpv6.php
+++ b/usr/local/www/services_dhcpv6.php
@@ -119,6 +119,7 @@ if (is_array($config['dhcpdv6'][$if])){
$pconfig['failover_peerip'] = $config['dhcpdv6'][$if]['failover_peerip'];
$pconfig['netmask'] = $config['dhcpdv6'][$if]['netmask'];
$pconfig['numberoptions'] = $config['dhcpdv6'][$if]['numberoptions'];
+ $pconfig['dhcpv6leaseinlocaltime'] = $config['dhcpdv6'][$if]['dhcpv6leaseinlocaltime'];
if (!is_array($config['dhcpdv6'][$if]['staticmap']))
$config['dhcpdv6'][$if]['staticmap'] = array();
$a_maps = &$config['dhcpdv6'][$if]['staticmap'];
@@ -143,9 +144,8 @@ if(is_array($dhcrelaycfg)) {
}
}
-/* FIXME needs v6 code, use in subnet v6? */
function is_inrange($test, $start, $end) {
- if ( (ip2ulong($test) < ip2ulong($end)) && (ip2ulong($test) > ip2ulong($start)) )
+ if ( (inet_pton($test) < inet_pton($end)) && (inet_pton($test) > inet_pton($start)) )
return true;
else
return false;
@@ -197,6 +197,16 @@ if ($_POST) {
$input_errors[] = gettext("The maximum lease time must be at least 60 seconds and higher than the default lease time.");
if (($_POST['ddnsdomain'] && !is_domain($_POST['ddnsdomain'])))
$input_errors[] = gettext("A valid domain name must be specified for the dynamic DNS registration.");
+ if ($_POST['domainsearchlist']) {
+ $domain_array=preg_split("/[ ;]+/",$_POST['domainsearchlist']);
+ foreach ($domain_array as $curdomain) {
+ if (!is_domain($curdomain)) {
+ $input_errors[] = gettext("A valid domain search list must be specified.");
+ break;
+ }
+ }
+ }
+
if (($_POST['ntp1'] && !is_ipaddrv6($_POST['ntp1'])) || ($_POST['ntp2'] && !is_ipaddrv6($_POST['ntp2'])))
$input_errors[] = gettext("A valid IPv6 address must be specified for the primary/secondary NTP servers.");
if (($_POST['domain'] && !is_domain($_POST['domain'])))
@@ -222,38 +232,40 @@ if ($_POST) {
$noip = true;
if (!$input_errors) {
/* make sure the range lies within the current subnet */
- /* FIXME change for ipv6 subnet */
$subnet_start = gen_subnetv6($ifcfgip, $ifcfgsn);
$subnet_end = gen_subnetv6_max($ifcfgip, $ifcfgsn);
- if((! ip_in_subnet($_POST['range_from'], $subnet_start)) || (! ip_in_subnet($_POST['range_to'], $subnet_start))) {
+ if ((! is_inrange($_POST['range_from'], $subnet_start, $subnet_end)) ||
+ (! is_inrange($_POST['range_to'], $subnet_start, $subnet_end))) {
$input_errors[] = gettext("The specified range lies outside of the current subnet.");
}
- /* no idea how to do this yet
- if (ip2ulong($_POST['range_from']) > ip2ulong($_POST['range_to']))
+ /* "from" cannot be higher than "to" */
+ if (inet_pton($_POST['range_from']) > inet_pton($_POST['range_to']))
$input_errors[] = gettext("The range is invalid (first element higher than second element).");
- */
/* make sure that the DHCP Relay isn't enabled on this interface */
if (isset($config['dhcrelay'][$if]['enable']))
$input_errors[] = sprintf(gettext("You must disable the DHCP relay on the %s interface before enabling the DHCP server."),$iflist[$if]);
- // $dynsubnet_start = ip2ulong($_POST['range_from']);
- // $dynsubnet_end = ip2ulong($_POST['range_to']);
- /* FIX later. Also applies to prefix delegation
+
+ /* Verify static mappings do not overlap:
+ - available DHCP range
+ - prefix delegation range (FIXME: still need to be completed) */
+ $dynsubnet_start = inet_pton($_POST['range_from']);
+ $dynsubnet_end = inet_pton($_POST['range_to']);
+
if(is_array($a_maps)) {
foreach ($a_maps as $map) {
if (empty($map['ipaddrv6']))
continue;
- if ((ip2ulong($map['ipaddrv6']) > $dynsubnet_start) &&
- (ip2ulong($map['ipaddr']) < $dynsubnet_end)) {
+ if ((inet_pton($map['ipaddrv6']) > $dynsubnet_start) &&
+ (inet_pton($map['ipaddr']) < $dynsubnet_end)) {
$input_errors[] = sprintf(gettext("The DHCP range cannot overlap any static DHCP mappings."));
break;
}
}
}
- */
}
}
@@ -308,6 +320,7 @@ if ($_POST) {
$config['dhcpdv6'][$if]['nextserver'] = $_POST['nextserver'];
$config['dhcpdv6'][$if]['filename'] = $_POST['filename'];
$config['dhcpdv6'][$if]['rootpath'] = $_POST['rootpath'];
+ $config['dhcpdv6'][$if]['dhcpv6leaseinlocaltime'] = $_POST['dhcpv6leaseinlocaltime'];
// Handle the custom options rowhelper
if(isset($config['dhcpdv6'][$if]['numberoptions']['item']))
@@ -389,15 +402,16 @@ include("head.inc");
document.iform.dns2.disabled = endis;
document.iform.deftime.disabled = endis;
document.iform.maxtime.disabled = endis;
- document.iform.gateway.disabled = endis;
+ //document.iform.gateway.disabled = endis;
document.iform.failover_peerip.disabled = endis;
+ document.iform.dhcpv6leaseinlocaltime.disabled = endis;
document.iform.domain.disabled = endis;
document.iform.domainsearchlist.disabled = endis;
document.iform.ddnsdomain.disabled = endis;
document.iform.ddnsupdate.disabled = endis;
document.iform.ntp1.disabled = endis;
document.iform.ntp2.disabled = endis;
- document.iform.tftp.disabled = endis;
+ //document.iform.tftp.disabled = endis;
document.iform.ldap.disabled = endis;
document.iform.netboot.disabled = endis;
document.iform.nextserver.disabled = endis;
@@ -417,13 +431,11 @@ include("head.inc");
aodiv = document.getElementById('showddns');
aodiv.style.display = "block";
}
- /*
function show_ntp_config() {
document.getElementById("showntpbox").innerHTML='';
aodiv = document.getElementById('showntp');
aodiv.style.display = "block";
}
- */
/*
function show_tftp_config() {
document.getElementById("showtftpbox").innerHTML='';
@@ -545,8 +557,7 @@ include("head.inc");
?>
-
<?php
- /* FIXME end of subnet calculation here */
- $range_to = gen_subnetv6_max($ifcfgip, $ifcfgsn);;
+ $range_to = gen_subnetv6_max($ifcfgip, $ifcfgsn);
echo $range_to;
?>
</td>
@@ -618,7 +629,7 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Domain search list");?></td>
<td width="78%" class="vtable">
<input name="domainsearchlist" type="text" class="formfld unknown" id="domainsearchlist" size="28" value="<?=htmlspecialchars($pconfig['domainsearchlist']);?>"><br>
- <?=gettext("The DHCP server can optionally provide a domain search list.");?>
+ <?=gettext("The DHCP server can optionally provide a domain search list. Use the semicolon character as seperator");?>
</td>
</tr>
<tr>
@@ -649,6 +660,31 @@ include("head.inc");
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Time format change"); ?></td>
+ <td width="78%" class="vtable">
+ <table>
+ <tr>
+ <td>
+ <input name="dhcpv6leaseinlocaltime" type="checkbox" id="dhcpv6leaseinlocaltime" value="yes" <?php if ($pconfig['dhcpv6leaseinlocaltime']) echo "checked"; ?>>
+ </td>
+ <td>
+ <strong>
+ <?=gettext("Change DHCPv6 display lease time from UTC to local time."); ?>
+ </strong>
+ </td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>
+ <span class="red"><strong><?=gettext("Note:");?></strong></span> <?=gettext("By default DHCPv6 leases are displayed in UTC time. By checking this
+ box DHCPv6 lease time will be displayed in local time and set to time zone selected. This will be used for all DHCPv6 interfaces lease time."); ?>
+
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Dynamic DNS");?></td>
<td width="78%" class="vtable">
<div id="showddnsbox">
@@ -664,7 +700,6 @@ include("head.inc");
</div>
</td>
</tr>
- <!-- ISC dhcpd does not support ntp for ipv6 yet. See redmine #2016
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("NTP servers");?></td>
<td width="78%" class="vtable">
@@ -677,7 +712,6 @@ include("head.inc");
</div>
</td>
</tr>
- -->
<!-- ISC dhcpd does not support tftp for ipv6 yet. See redmine #2016
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("TFTP server");?></td>
diff --git a/usr/local/www/services_dyndns.php b/usr/local/www/services_dyndns.php
index 9b359f4..950733b 100755
--- a/usr/local/www/services_dyndns.php
+++ b/usr/local/www/services_dyndns.php
@@ -159,7 +159,8 @@ include("head.inc");
<td colspan="3" class="list"><p class="vexpl"><span class="red"><strong>
<?=gettext("Note:");?><br>
</strong></span>
- <?=gettext("IP addresses appearing in green are up to date with Dynamic DNS provider.");?>
+ <?=gettext("IP addresses appearing in green are up to date with Dynamic DNS provider.");?><br>
+ <?=gettext("You can force an update for an IP address on the edit page for that service.");?>
</td>
<td class="list">&nbsp;</td>
</tr>
diff --git a/usr/local/www/services_dyndns_edit.php b/usr/local/www/services_dyndns_edit.php
index 136d654..f09b9f6 100644
--- a/usr/local/www/services_dyndns_edit.php
+++ b/usr/local/www/services_dyndns_edit.php
@@ -104,6 +104,7 @@ if ($_POST) {
$dyndns['enable'] = $_POST['enable'] ? false : true;
$dyndns['interface'] = $_POST['interface'];
$dyndns['descr'] = $_POST['descr'];
+ $dyndns['force'] = isset($_POST['force']);
if($dyndns['username'] == "none")
$dyndns['username'] = "";
@@ -115,15 +116,7 @@ if ($_POST) {
write_config();
- $retval = 0;
-
- conf_mount_rw();
-
- unlink("{$g['conf_path']}/dyndns_{$dyndns['interface']}{$dyndns['type']}{$dyndns['host']}.cache");
-
- $retval = services_dyndns_configure_client($dyndns);
-
- conf_mount_ro();
+ services_dyndns_configure_client($dyndns);
header("Location: services_dyndns.php");
exit;
@@ -237,6 +230,7 @@ include("head.inc");
<a href="services_dyndns.php"><input name="cancel" type="button" class="formbtn" value="<?=gettext("Cancel");?>"></a>
<?php if (isset($id) && $a_dyndns[$id]): ?>
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>">
+ <input name="force" type="submit" class="formbtn" value="<?=gettext("Save & Force Update");?>" onClick="enable_change(true)">
<?php endif; ?>
</td>
</tr>
diff --git a/usr/local/www/status_dhcp_leases.php b/usr/local/www/status_dhcp_leases.php
index ba18b72..f1dec97 100755
--- a/usr/local/www/status_dhcp_leases.php
+++ b/usr/local/www/status_dhcp_leases.php
@@ -44,6 +44,7 @@
##|-PRIV
require("guiconfig.inc");
+require_once("config.inc");
$pgtitle = array(gettext("Status"),gettext("DHCP leases"));
@@ -94,8 +95,24 @@ function leasecmp($a, $b) {
}
function adjust_gmt($dt) {
- $ts = strtotime($dt . " GMT");
- return strftime("%Y/%m/%d %H:%M:%S", $ts);
+ global $config;
+ $dhcpd = $config['dhcpd'];
+ foreach ($dhcpd as $dhcpleaseinlocaltime) {
+ $dhcpleaseinlocaltime = $dhcpleaseinlocaltime['dhcpleaseinlocaltime'];
+ if ($dhcpleaseinlocaltime == "yes")
+ break;
+ }
+ $timezone = $config['system']['timezone'];
+ $ts = strtotime($dt . " GMT");
+ if ($dhcpleaseinlocaltime == "yes") {
+ $this_tz = new DateTimeZone($timezone);
+ $dhcp_lt = new DateTime(strftime("%I:%M:%S%p", $ts), $this_tz);
+ $offset = $this_tz->getOffset($dhcp_lt);
+ $ts = $ts + $offset;
+ return strftime("%Y/%m/%d %I:%M:%S%p", $ts);
+ }
+ else
+ return strftime("%Y/%m/%d %H:%M:%S", $ts);
}
function remove_duplicate($array, $field)
diff --git a/usr/local/www/status_dhcpv6_leases.php b/usr/local/www/status_dhcpv6_leases.php
index 6153259..2f2696d 100644
--- a/usr/local/www/status_dhcpv6_leases.php
+++ b/usr/local/www/status_dhcpv6_leases.php
@@ -45,6 +45,7 @@
##|-PRIV
require("guiconfig.inc");
+require_once("config.inc");
$pgtitle = array(gettext("Status"),gettext("DHCPv6 leases"));
@@ -95,8 +96,24 @@ function leasecmp($a, $b) {
}
function adjust_gmt($dt) {
+ global $config;
+ $dhcpdv6 = $config['dhcpdv6'];
+ foreach ($dhcpdv6 as $dhcpv6leaseinlocaltime) {
+ $dhcpv6leaseinlocaltime = $dhcpv6leaseinlocaltime['dhcpv6leaseinlocaltime'];
+ if ($dhcpv6leaseinlocaltime == "yes")
+ break;
+ }
+ $timezone = $config['system']['timezone'];
$ts = strtotime($dt . " GMT");
- return strftime("%Y/%m/%d %H:%M:%S", $ts);
+ if ($dhcpv6leaseinlocaltime == "yes") {
+ $this_tz = new DateTimeZone($timezone);
+ $dhcp_lt = new DateTime(strftime("%I:%M:%S%p", $ts), $this_tz);
+ $offset = $this_tz->getOffset($dhcp_lt);
+ $ts = $ts + $offset;
+ return strftime("%Y/%m/%d %I:%M:%S%p", $ts);
+ }
+ else
+ return strftime("%Y/%m/%d %H:%M:%S", $ts);
}
function remove_duplicate($array, $field) {
diff --git a/usr/local/www/status_interfaces.php b/usr/local/www/status_interfaces.php
index e998ae1..248667a 100755
--- a/usr/local/www/status_interfaces.php
+++ b/usr/local/www/status_interfaces.php
@@ -260,6 +260,22 @@ include("head.inc");
<?=htmlspecialchars($ifinfo['media']);?>
</td>
</tr>
+ <?php endif; if ($ifinfo['laggproto']): ?>
+ <tr>
+ <td width="22%" class="vncellt"><?=gettext("LAGG Protocol");?></td>
+ <td width="78%" class="listr">
+ <?=htmlspecialchars($ifinfo['laggproto']);?>
+ </td>
+ </tr>
+ <?php endif; if (is_array($ifinfo['laggport'])): ?>
+ <tr>
+ <td width="22%" class="vncellt"><?=gettext("LAGG Ports");?></td>
+ <td width="78%" class="listr">
+ <?php foreach ($ifinfo['laggport'] as $laggport) { ?>
+ <?php echo htmlspecialchars($laggport); ?><br/>
+ <?php } ?>
+ </td>
+ </tr>
<?php endif; ?><?php if ($ifinfo['channel']): ?>
<tr>
<td width="22%" class="vncellt"><?=gettext("Channel");?></td>
diff --git a/usr/local/www/system.php b/usr/local/www/system.php
index 6248ada..914f182 100755
--- a/usr/local/www/system.php
+++ b/usr/local/www/system.php
@@ -61,6 +61,7 @@ $pconfig['timezone'] = $config['system']['timezone'];
$pconfig['timeupdateinterval'] = $config['system']['time-update-interval'];
$pconfig['timeservers'] = $config['system']['timeservers'];
$pconfig['theme'] = $config['system']['theme'];
+$pconfig['language'] = $config['system']['language'];
$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']);
@@ -170,6 +171,11 @@ if ($_POST) {
update_if_changed("NTP servers", $config['system']['timeservers'], strtolower($_POST['timeservers']));
update_if_changed("NTP update interval", $config['system']['time-update-interval'], $_POST['timeupdateinterval']);
+ if($_POST['language'] && $_POST['language'] != $config['system']['language']) {
+ $config['system']['language'] = $_POST['language'];
+ set_language($config['system']['language']);
+ }
+
/* pfSense themes */
if (! $g['disablethemeselection']) {
update_if_changed("System Theme", $config['theme'], $_POST['theme']);
@@ -404,6 +410,24 @@ include("head.inc");
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell"><?php echo gettext("Language");?></td>
+ <td width="78%" class="vtable">
+ <select name="language">
+ <?php
+ foreach(get_locale_list() as $lcode => $ldesc) {
+ $selected = ' selected';
+ if($lcode != $pconfig['language'])
+ $selected = '';
+ echo "<option value=\"{$lcode}\"{$selected}>{$ldesc}</option>";
+ }
+ ?>
+ </select>
+ <strong>
+ <?=gettext("Choose a language for the webConfigurator"); ?>
+ </strong>
+ </td>
+ </tr>
+ <tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
<?php if (! $g['disablethemeselection']): ?>
diff --git a/usr/local/www/system_advanced_admin.php b/usr/local/www/system_advanced_admin.php
index a843c7c..84070fc 100644
--- a/usr/local/www/system_advanced_admin.php
+++ b/usr/local/www/system_advanced_admin.php
@@ -286,7 +286,7 @@ function prot_change() {
<div class="tabcont">
<span class="vexpl">
<span class="red">
- <strong><?=gettext("Note:"); ?>&nbsp</strong>
+ <strong><?=gettext("NOTE:"); ?>&nbsp</strong>
</span>
<?=gettext("The options on this page are intended for use by advanced users only."); ?>
<br/>
diff --git a/usr/local/www/system_advanced_notifications.php b/usr/local/www/system_advanced_notifications.php
index d314f11..9983711 100644
--- a/usr/local/www/system_advanced_notifications.php
+++ b/usr/local/www/system_advanced_notifications.php
@@ -73,6 +73,9 @@ if($config['notifications']['smtp']['password'])
if($config['notifications']['smtp']['fromaddress'])
$pconfig['smtpfromaddress'] = $config['notifications']['smtp']['fromaddress'];
+// System Sounds
+$pconfig['disablebeep'] = isset($config['system']['disablebeep']);
+
if ($_POST) {
unset($input_errors);
@@ -108,6 +111,12 @@ if ($_POST) {
$config['notifications']['smtp']['password'] = $_POST['smtppassword'];
$config['notifications']['smtp']['fromaddress'] = $_POST['smtpfromaddress'];
+ // System Sounds
+ if($_POST['disablebeep'] == "yes")
+ $config['system']['disablebeep'] = true;
+ else
+ unset($config['system']['disablebeep']);
+
write_config();
// Send test message via growl
@@ -246,11 +255,29 @@ include("head.inc");
</td>
</tr>
<tr>
+ <td colspan="2" class="list" height="12">&nbsp;</td>
+ </tr>
+ <!-- System Sounds -->
+ <tr>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("System Sounds"); ?></td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Startup/Shutdown Sound"); ?></td>
+ <td width="78%" class="vtable">
+ <input name="disablebeep" type="checkbox" id="disablebeep" value="yes" <?php if ($pconfig['disablebeep']) echo "checked"; ?> />
+ <strong><?=gettext("Disable the startup/shutdown beep"); ?></strong>
+ <br/>
+ <span class="vexpl"><?=gettext("When this is checked, startup and shutdown sounds will no longer play."); ?></span>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="list" height="12">&nbsp;</td>
+ </tr>
+ <tr>
<td valign="top" class="">
&nbsp;
</td>
<td>
- <br/>
<input type='submit' id='Submit' name='Submit' value='<?=gettext("Save"); ?>'></form>
</td>
</tr>
diff --git a/usr/local/www/system_certmanager.php b/usr/local/www/system_certmanager.php
index 753d713..2b49e35 100644
--- a/usr/local/www/system_certmanager.php
+++ b/usr/local/www/system_certmanager.php
@@ -701,6 +701,8 @@ function internalca_change() {
<td width="78%" class="vtable">
<select name='csr_keylen' class="formselect">
<?php
+ if (!isset($pconfig['keylen']) && isset($pconfig['csr_keylen']))
+ $pconfig['keylen'] = $pconfig['csr_keylen'];
foreach( $cert_keylens as $len):
$selected = "";
if ($pconfig['keylen'] == $len)
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index 86cb0c8..a9f28cf 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -123,13 +123,13 @@ if ($_POST) {
}
}
if(is_ipaddrv6($_POST['gateway'])) {
- $parent_ip = get_interface_ipv6($_POST['interface']);
- $parent_sn = get_interface_subnetv6($_POST['interface']);
- if(empty($parent_ip) || empty($parent_sn)) {
- $input_errors[] = gettext("You can not use a IPv4 Gateway Address on a IPv6 only interface.");
- } else {
- /* do not do a subnet match on a link local address, it's valid */
- if(! preg_match("/fe80::/", $_POST['gateway'])) {
+ /* do not do a subnet match on a link local address, it's valid */
+ if(! preg_match("/fe80::/", $_POST['gateway'])) {
+ $parent_ip = get_interface_ipv6($_POST['interface']);
+ $parent_sn = get_interface_subnetv6($_POST['interface']);
+ if(empty($parent_ip) || empty($parent_sn)) {
+ $input_errors[] = gettext("You can not use a IPv4 Gateway Address on a IPv6 only interface.");
+ } else {
$subnet = gen_subnetv6($parent_ip, $parent_sn) . "/" . $parent_sn;
if(!ip_in_subnet($_POST['gateway'], $subnet))
$input_errors[] = sprintf(gettext("The gateway address %1\$s does not lie within the chosen interface's subnet '%2\$s'."), $_POST['gateway'],$subnet);
diff --git a/usr/local/www/system_routes.php b/usr/local/www/system_routes.php
index 64484a7..e4a36fb 100755
--- a/usr/local/www/system_routes.php
+++ b/usr/local/www/system_routes.php
@@ -60,7 +60,7 @@ if ($_POST) {
$retval = 0;
if (file_exists("{$g['tmp_path']}/.system_routes.apply")) {
- $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.system_routes.apply"));
+ $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.system_routes.apply"));
foreach ($toapplylist as $toapply)
mwexec("{$toapply}");
@@ -138,21 +138,32 @@ include("head.inc");
</tr>
<tr>
<?php $i = 0; foreach ($a_routes as $route): ?>
+ <?php
+ if (isset($route['disabled'])) {
+ $textss = "<span class=\"gray\">";
+ $textse = "</span>";
+ } else
+ $textss = $textse = "";
+ ?>
<td class="listlr" ondblclick="document.location='system_routes_edit.php?id=<?=$i;?>';">
- <?=strtolower($route['network']);?>
+ <?=$textss;?><?=strtolower($route['network']);?><?=$textse;?>
</td>
<td class="listr" ondblclick="document.location='system_routes_edit.php?id=<?=$i;?>';">
+ <?=$textss;?>
<?php
echo htmlentities($a_gateways[$route['gateway']]['name']) . " - " . htmlentities($a_gateways[$route['gateway']]['gateway']);
?>
+ <?=$textse;?>
</td>
<td class="listr" ondblclick="document.location='system_routes_edit.php?id=<?=$i;?>';">
+ <?=$textss;?>
<?php
echo convert_friendly_interface_to_friendly_descr($a_gateways[$route['gateway']]['friendlyiface']) . " ";
?>
+ <?=$textse;?>
</td>
<td class="listbg" ondblclick="document.location='system_routes_edit.php?id=<?=$i;?>';">
- <?=htmlspecialchars($route['descr']);?>&nbsp;
+ <?=$textss;?><?=htmlspecialchars($route['descr']);?>&nbsp;<?=$textse;?>
</td>
<td valign="middle" nowrap class="list">
<table border="0" cellspacing="0" cellpadding="1">
diff --git a/usr/local/www/system_routes_edit.php b/usr/local/www/system_routes_edit.php
index cf38206..3bce554 100755
--- a/usr/local/www/system_routes_edit.php
+++ b/usr/local/www/system_routes_edit.php
@@ -73,6 +73,7 @@ if (isset($id) && $a_routes[$id]) {
explode('/', $a_routes[$id]['network']);
$pconfig['gateway'] = $a_routes[$id]['gateway'];
$pconfig['descr'] = $a_routes[$id]['descr'];
+ $pconfig['disabled'] = isset($a_routes[$id]['disabled']);
}
if (isset($_GET['dup']))
@@ -130,6 +131,10 @@ if ($_POST) {
$route['network'] = $osn;
$route['gateway'] = $_POST['gateway'];
$route['descr'] = $_POST['descr'];
+ if ($_POST['disabled'])
+ $route['disabled'] = true;
+ else
+ unset($route['disabled']);
if (!isset($id))
$id = count($a_routes);
@@ -264,6 +269,14 @@ include("head.inc");
</div>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Disabled");?></td>
+ <td width="78%" class="vtable">
+ <input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked"; ?>>
+ <strong><?=gettext("Disable this static route");?></strong><br />
+ <span class="vexpl"><?=gettext("Set this option to disable this static route without removing it from the list.");?></span>
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
OpenPOWER on IntegriCloud