summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/diag_backup.php1
-rwxr-xr-xusr/local/www/diag_logs_settings.php47
-rwxr-xr-xusr/local/www/diag_traceroute.php2
-rwxr-xr-xusr/local/www/firewall_aliases.php2
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php84
-rwxr-xr-xusr/local/www/firewall_nat_edit.php2
-rwxr-xr-xusr/local/www/firewall_nat_out_edit.php4
-rwxr-xr-xusr/local/www/firewall_rules_edit.php4
-rwxr-xr-xusr/local/www/firewall_virtual_ip.php13
-rwxr-xr-xusr/local/www/guiconfig.inc26
-rwxr-xr-xusr/local/www/interfaces.php544
-rw-r--r--usr/local/www/interfaces_gre_edit.php2
-rwxr-xr-xusr/local/www/load_balancer_pool_edit.php2
-rwxr-xr-xusr/local/www/load_balancer_virtual_server_edit.php2
-rwxr-xr-xusr/local/www/services_captiveportal_filemanager.php6
-rwxr-xr-xusr/local/www/services_dhcp_edit.php22
-rwxr-xr-xusr/local/www/services_dyndns.php11
-rw-r--r--usr/local/www/services_dyndns_edit.php5
-rw-r--r--usr/local/www/services_rfc2136.php57
-rw-r--r--usr/local/www/services_rfc2136_edit.php17
-rwxr-xr-xusr/local/www/status_dhcp_leases.php3
-rwxr-xr-xusr/local/www/status_rrd_graph.php6
-rw-r--r--usr/local/www/status_rrd_graph_img.php156
-rw-r--r--usr/local/www/system_advanced_firewall.php70
-rw-r--r--usr/local/www/system_advanced_network.php33
-rw-r--r--usr/local/www/system_usermanager_addprivs.php2
-rw-r--r--usr/local/www/widgets/widgets/system_information.widget.php6
27 files changed, 932 insertions, 197 deletions
diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php
index 6bcdb6b..8e3f601 100755
--- a/usr/local/www/diag_backup.php
+++ b/usr/local/www/diag_backup.php
@@ -182,6 +182,7 @@ function spit_out_select_items($name, $showall) {
"voucher" => gettext("Captive Portal Vouchers"),
"dnsmasq" => gettext("DNS Forwarder"),
"dhcpd" => gettext("DHCP Server"),
+ "dhcpdv6" => gettext("DHCPv6 Server"),
"filter" => gettext("Firewall Rules"),
"interfaces" => gettext("Interfaces"),
"ipsec" => gettext("IPSEC"),
diff --git a/usr/local/www/diag_logs_settings.php b/usr/local/www/diag_logs_settings.php
index 42cf79e..ee4fdd8 100755
--- a/usr/local/www/diag_logs_settings.php
+++ b/usr/local/www/diag_logs_settings.php
@@ -63,6 +63,9 @@ $pconfig['logall'] = isset($config['syslog']['logall']);
$pconfig['system'] = isset($config['syslog']['system']);
$pconfig['enable'] = isset($config['syslog']['enable']);
$pconfig['logdefaultblock'] = !isset($config['syslog']['nologdefaultblock']);
+$pconfig['logbogons'] = !isset($config['syslog']['nologbogons']);
+$pconfig['logprivatenets'] = !isset($config['syslog']['nologprivatenets']);
+$pconfig['loglighttpd'] = !isset($config['syslog']['nologlighttpd']);
$pconfig['rawfilter'] = isset($config['syslog']['rawfilter']);
$pconfig['filterdescriptions'] = $config['syslog']['filterdescriptions'];
$pconfig['disablelocallogging'] = isset($config['syslog']['disablelocallogging']);
@@ -115,7 +118,13 @@ if ($_POST) {
$config['syslog']['disablelocallogging'] = $_POST['disablelocallogging'] ? true : false;
$config['syslog']['enable'] = $_POST['enable'] ? true : false;
$oldnologdefaultblock = isset($config['syslog']['nologdefaultblock']);
+ $oldnologbogons = isset($config['syslog']['nologbogons']);
+ $oldnologprivatenets = isset($config['syslog']['nologprivatenets']);
+ $oldnologlighttpd = isset($config['syslog']['nologlighttpd']);
$config['syslog']['nologdefaultblock'] = $_POST['logdefaultblock'] ? false : true;
+ $config['syslog']['nologbogons'] = $_POST['logbogons'] ? false : true;
+ $config['syslog']['nologprivatenets'] = $_POST['logprivatenets'] ? false : true;
+ $config['syslog']['nologlighttpd'] = $_POST['loglighttpd'] ? false : true;
$config['syslog']['rawfilter'] = $_POST['rawfilter'] ? true : false;
if (is_numeric($_POST['filterdescriptions']) && $_POST['filterdescriptions'] > 0)
$config['syslog']['filterdescriptions'] = $_POST['filterdescriptions'];
@@ -131,12 +140,22 @@ if ($_POST) {
$retval = 0;
$retval = system_syslogd_start();
- if ($oldnologdefaultblock !== isset($config['syslog']['nologdefaultblock']))
+ if (($oldnologdefaultblock !== isset($config['syslog']['nologdefaultblock']))
+ || ($oldnologbogons !== isset($config['syslog']['nologbogons']))
+ || ($oldnologprivatenets !== isset($config['syslog']['nologprivatenets'])))
$retval |= filter_configure();
- filter_pflog_start(true);
-
$savemsg = get_std_save_message($retval);
+
+ if ($oldnologlighttpd !== isset($config['syslog']['nologlighttpd'])) {
+ ob_flush();
+ flush();
+ log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
+ send_event("service restart webgui");
+ $savemsg .= "<br />" . gettext("WebGUI process is restarting.");
+ }
+
+ filter_pflog_start(true);
}
}
@@ -253,11 +272,23 @@ function check_everything() {
</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 " .
- "if you uncheck this option. Per-rule logging options are still respected.");?></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 if you uncheck this option. Per-rule logging options are still respected.");?>
+ <br/>
+ <input name="logbogons" type="checkbox" id="logbogons" value="yes" <?php if ($pconfig['logbogons']) echo "checked"; ?>>
+ <strong><?=gettext("Log packets blocked by 'Block Bogon Networks' rules");?></strong><br/>
+ <br/>
+ <input name="logprivatenets" type="checkbox" id="logprivatenets" value="yes" <?php if ($pconfig['logprivatenets']) echo "checked"; ?>>
+ <strong><?=gettext("Log packets blocked by 'Block Private Networks' rules");?></strong><br/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" class="vtable">Web Server Log</td>
+ <td class="vtable"> <input name="loglighttpd" type="checkbox" id="loglighttpd" value="yes" <?php if ($pconfig['loglighttpd']) echo "checked"; ?>>
+ <strong><?=gettext("Log errors from the web server process.");?></strong><br>
+ <?=gettext("Hint: If this is checked, errors from the lighttpd web server process for the GUI or Captive Portal will appear in the main system log.");?></td>
</tr>
<tr>
<td valign="top" class="vtable">Raw Logs</td>
diff --git a/usr/local/www/diag_traceroute.php b/usr/local/www/diag_traceroute.php
index 6399708..1e27020 100755
--- a/usr/local/www/diag_traceroute.php
+++ b/usr/local/www/diag_traceroute.php
@@ -187,7 +187,7 @@ if ($do_traceroute) {
if ($ifaddr && (is_ipaddr($host) || is_hostname($host)))
$srcip = "-s " . escapeshellarg($ifaddr);
- $cmd = "{$command} {$n} {$srcip} -w 2 -m " . escapeshellarg($ttl) . " " . escapeshellarg($host);
+ $cmd = "{$command} {$n} {$srcip} -w 2 {$useicmp} -m " . escapeshellarg($ttl) . " " . escapeshellarg($host);
//echo "Traceroute command: {$cmd}\n";
system($cmd);
diff --git a/usr/local/www/firewall_aliases.php b/usr/local/www/firewall_aliases.php
index 845a957..db4c58a 100755
--- a/usr/local/www/firewall_aliases.php
+++ b/usr/local/www/firewall_aliases.php
@@ -173,7 +173,7 @@ include("head.inc");
$tab_array = array();
$tab_array[] = array(gettext("IP"),($tab=="ip" ? true : ($tab=="host" ? true : ($tab == "network" ? true : false))), "/firewall_aliases.php?tab=ip");
$tab_array[] = array(gettext("Ports"), ($tab=="port"? true : false), "/firewall_aliases.php?tab=port");
- $tab_array[] = array(gettext("Urls"), ($tab=="url"? true : false), "/firewall_aliases.php?tab=url");
+ $tab_array[] = array(gettext("URLs"), ($tab=="url"? true : false), "/firewall_aliases.php?tab=url");
$tab_array[] = array(gettext("All"), ($tab=="all"? true : false), "/firewall_aliases.php?tab=all");
display_top_tabs($tab_array);
?>
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index 115ee92..1b0a194 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -106,12 +106,11 @@ if (isset($id) && $a_aliases[$id]) {
if($ifdesc == $pconfig['descr'])
$input_errors[] = sprintf(gettext("Sorry, an interface is already named %s."), $pconfig['descr']);
- if($a_aliases[$id]['type'] == "urltable") {
+ if(preg_match("/urltable/i", $a_aliases[$id]['type'])) {
$pconfig['address'] = $a_aliases[$id]['url'];
$pconfig['updatefreq'] = $a_aliases[$id]['updatefreq'];
}
if($a_aliases[$id]['aliasurl'] <> "") {
- $pconfig['type'] = "url";
if(is_array($a_aliases[$id]['aliasurl']))
$pconfig['address'] = implode(" ", $a_aliases[$id]['aliasurl']);
else
@@ -166,7 +165,7 @@ if ($_POST) {
$final_address_details = array();
$alias['name'] = $_POST['name'];
- if ($_POST['type'] == "urltable") {
+ if (preg_match("/urltable/i", $_POST['type'])) {
$address = "";
$isfirst = 0;
@@ -190,7 +189,7 @@ if ($_POST) {
else
$final_address_details[] = sprintf(gettext("Entry added %s"), date('r'));
}
- } elseif($_POST['type'] == "url") {
+ } else if ($_POST['type'] == "url" || $_POST['type'] == "url_ports") {
$isfirst = 0;
$address_count = 2;
@@ -202,14 +201,15 @@ if ($_POST) {
$isfirst = 0;
$temp_filename = tempnam("{$g['tmp_path']}/", "alias_import");
unlink($temp_filename);
- $fda = fopen("{$g['tmp_path']}/tmpfetch","w");
- fwrite($fda, "/usr/bin/fetch -q -o \"{$temp_filename}/aliases\" \"" . $_POST['address' . $x] . "\"");
- fclose($fda);
+ $verify_ssl = isset($config['system']['checkaliasesurlcert']);
mwexec("/bin/mkdir -p {$temp_filename}");
- mwexec("/usr/bin/fetch -q -o \"{$temp_filename}/aliases\" \"" . $_POST['address' . $x] . "\"");
+ download_file($_POST['address' . $x], $temp_filename . "/aliases", $verify_ssl);
+
/* if the item is tar gzipped then extract */
if(stristr($_POST['address' . $x], ".tgz"))
process_alias_tgz($temp_filename);
+ else if(stristr($_POST['address' . $x], ".zip"))
+ process_alias_unzip($temp_filename);
if (!isset($alias['aliasurl']))
$alias['aliasurl'] = array();
@@ -234,7 +234,12 @@ if ($_POST) {
$tmp = trim($tmp_split[0]);
}
$tmp = trim($tmp);
- if(!empty($tmp) && (is_ipaddr($tmp) || is_subnet($tmp))) {
+ if ($_POST['type'] == "url")
+ $is_valid = (is_ipaddr($tmp) || is_subnet($tmp));
+ else
+ $is_valid = (is_port($tmp) || is_portrange($tmp));
+
+ if (!empty($tmp) && $is_valid) {
$address[] = $tmp;
$isfirst = 1;
$address_count++;
@@ -252,6 +257,8 @@ if ($_POST) {
}
}
}
+ if ($_POST['type'] == "url_ports")
+ $address = group_ports($address);
} else {
/* item is a normal alias type */
$wrongaliases = "";
@@ -262,7 +269,7 @@ if ($_POST) {
if (!alias_same_type($_POST["address{$x}"], $_POST['type']))
// But alias type network can include alias type urltable. Feature#1603.
if (!($_POST['type'] == 'network' &&
- alias_get_type($_POST["address{$x}"]) == 'urltable'))
+ preg_match("/urltable/i", alias_get_type($_POST["address{$x}"]))))
$wrongaliases .= " " . $_POST["address{$x}"];
} else if ($_POST['type'] == "port") {
if (!is_port($_POST["address{$x}"]))
@@ -372,7 +379,7 @@ if ($_POST) {
{
$pconfig['name'] = $_POST['name'];
$pconfig['descr'] = $_POST['descr'];
- if ($_POST['type'] == 'url')
+ if (($_POST['type'] == 'url') || ($_POST['type'] == 'url_ports'))
$pconfig['address'] = implode(" ", $alias['aliasurl']);
else
$pconfig['address'] = implode(" ", $address);
@@ -441,8 +448,23 @@ function typesel_change() {
eval(comd);
}
break;
-
- case 4: /* urltable */
+ case 4: /* url_ports */
+ var cmd;
+ newrows = totalrows;
+ for(i=0; i<newrows; i++) {
+ comd = 'document.iform.address_subnet' + i + '.disabled = 1;';
+ eval(comd);
+ }
+ break;
+ case 5: /* urltable */
+ var cmd;
+ newrows = totalrows;
+ for(i=0; i<newrows; i++) {
+ comd = 'document.iform.address_subnet' + i + '.disabled = 0;';
+ eval(comd);
+ }
+ break;
+ case 6: /* urltable_ports */
var cmd;
newrows = totalrows;
for(i=0; i<newrows; i++) {
@@ -470,15 +492,19 @@ $hosts_str = gettext("Host(s)");
$ip_str = gettext("IP");
$ports_str = gettext("Port(s)");
$port_str = gettext("Port");
-$url_str = gettext("URL");
-$urltable_str = gettext("URL Table");
+$url_str = gettext("URL (IPs)");
+$url_ports_str = gettext("URL (Ports)");
+$urltable_str = gettext("URL Table (IPs)");
+$urltable_ports_str = gettext("URL Table (Ports)");
$update_freq_str = gettext("Update Freq.");
$networks_help = gettext("Networks are specified in CIDR format. Select the CIDR mask that pertains to each entry. /32 specifies a single IPv4 host, /128 specifies a single IPv6 host, /24 specifies 255.255.255.0, /64 specifies a normal IPv6 network, etc. Hostnames (FQDNs) may also be specified, using a /32 mask for IPv4 or /128 for IPv6. You may also enter an IP range such as 192.168.1.1-192.168.1.254 and a list of CIDR networks will be derived to fill the range.");
$hosts_help = gettext("Enter as many hosts as you would like. Hosts must be specified by their IP address or fully qualified domain name (FQDN). FQDN hostnames are periodically re-resolved and updated. If multiple IPs are returned by a DNS query, all are used.");
$ports_help = gettext("Enter as many ports as you wish. Port ranges can be expressed by seperating with a colon.");
$url_help = sprintf(gettext("Enter as many URLs as you wish. After saving %s will download the URL and import the items into the alias. Use only with small sets of IP addresses (less than 3000)."), $g['product_name']);
+$url_ports_help = sprintf(gettext("Enter as many URLs as you wish. After saving %s will download the URL and import the items into the alias. Use only with small sets of Ports (less than 3000)."), $g['product_name']);
$urltable_help = sprintf(gettext("Enter a single URL containing a large number of IPs and/or Subnets. After saving %s will download the URL and create a table file containing these addresses. This will work with large numbers of addresses (30,000+) or small numbers."), $g['product_name']);
+$urltable_ports_help = sprintf(gettext("Enter a single URL containing a list of Port numbers and/or Port ranges. After saving %s will download the URL."), $g['product_name']);
$openvpn_str = gettext("Username");
$openvpn_user_str = gettext("OpenVPN Users");
@@ -518,6 +544,13 @@ function update_box_type() {
document.getElementById ("threecolumn").firstChild.data = "{$description_str}";
document.getElementById ("itemhelp").firstChild.data = "{$url_help}";
document.getElementById ("addrowbutton").style.display = 'block';
+ } else if(selected == '{$url_ports_str}') {
+ document.getElementById ("addressnetworkport").firstChild.data = "{$url_ports_str}";
+ document.getElementById ("onecolumn").firstChild.data = "{$url_ports_str}";
+ document.getElementById ("twocolumn").firstChild.data = "";
+ document.getElementById ("threecolumn").firstChild.data = "{$description_str}";
+ document.getElementById ("itemhelp").firstChild.data = "{$url_ports_help}";
+ document.getElementById ("addrowbutton").style.display = 'block';
} else if(selected == '{$openvpn_user_str}') {
document.getElementById ("addressnetworkport").firstChild.data = "{$openvpn_user_str}";
document.getElementById ("onecolumn").firstChild.data = "{$openvpn_str}";
@@ -538,6 +571,19 @@ function update_box_type() {
document.getElementById ("threecolumn").style.display = 'none';
document.getElementById ("itemhelp").firstChild.data = "{$urltable_help}";
document.getElementById ("addrowbutton").style.display = 'none';
+ } else if(selected == '{$urltable_ports_str}') {
+ if ((typeof(totalrows) == "undefined") || (totalrows < 1)) {
+ addRowTo('maintable', 'formfldalias');
+ typesel_change();
+ add_alias_control(this);
+ }
+ document.getElementById ("addressnetworkport").firstChild.data = "{$url_str}";
+ document.getElementById ("onecolumn").firstChild.data = "{$url_str}";
+ document.getElementById ("twocolumn").firstChild.data = "{$update_freq_str}";
+ document.getElementById ("threecolumn").firstChild.data = "";
+ document.getElementById ("threecolumn").style.display = 'none';
+ document.getElementById ("itemhelp").firstChild.data = "{$urltable_ports_help}";
+ document.getElementById ("addrowbutton").style.display = 'none';
}
}
//]]>
@@ -584,7 +630,7 @@ EOD;
<form action="firewall_aliases_edit.php" method="post" name="iform" id="iform">
<?php
if (empty($tab)) {
- if ($pconfig['type'] == 'urltable')
+ if (preg_match("/url/i", $pconfig['type']))
$tab = 'url';
else if ($pconfig['type'] == 'host')
$tab = 'ip';
@@ -630,8 +676,10 @@ if (empty($tab)) {
<option value="network" <?php if ($pconfig['type'] == "network") echo "selected=\"selected\""; ?>><?=gettext("Network(s)"); ?></option>
<option value="port" <?php if ($pconfig['type'] == "port") echo "selected=\"selected\""; ?>><?=gettext("Port(s)"); ?></option>
<!--<option value="openvpn" <?php if ($pconfig['type'] == "openvpn") echo "selected=\"selected\""; ?>><?=gettext("OpenVPN Users"); ?></option> -->
- <option value="url" <?php if ($pconfig['type'] == "url") echo "selected=\"selected\""; ?>><?=gettext("URL");?></option>
- <option value="urltable" <?php if ($pconfig['type'] == "urltable") echo "selected=\"selected\""; ?>><?=gettext("URL Table"); ?></option>
+ <option value="url" <?php if ($pconfig['type'] == "url") echo "selected=\"selected\""; ?>><?=gettext("URL (IPs)");?></option>
+ <option value="url_ports" <?php if ($pconfig['type'] == "url_ports") echo "selected=\"selected\""; ?>><?=gettext("URL (Ports)");?></option>
+ <option value="urltable" <?php if ($pconfig['type'] == "urltable") echo "selected=\"selected\""; ?>><?=gettext("URL Table (IPs)"); ?></option>
+ <option value="urltable_ports" <?php if ($pconfig['type'] == "urltable_ports") echo "selected=\"selected\""; ?>><?=gettext("URL Table (Ports)"); ?></option>
</select>
</td>
</tr>
diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php
index 87de18f..a9399f8 100755
--- a/usr/local/www/firewall_nat_edit.php
+++ b/usr/local/www/firewall_nat_edit.php
@@ -912,7 +912,7 @@ $has_updated_time = (isset($a_nat[$id]['updated']) && is_array($a_nat[$id]['upda
<script type="text/javascript">
//<![CDATA[
var addressarray = <?= json_encode(get_alias_list(array("host", "network", "openvpn", "urltable"))) ?>;
- var customarray = <?= json_encode(get_alias_list("port")) ?>;
+ var customarray = <?= json_encode(get_alias_list(array("port", "url_ports", "urltable_ports"))) ?>;
var oTextbox1 = new AutoSuggestControl(document.getElementById("localip"), new StateSuggestions(addressarray));
var oTextbox2 = new AutoSuggestControl(document.getElementById("src"), new StateSuggestions(addressarray));
diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php
index 1cc2e4d..46139c9 100755
--- a/usr/local/www/firewall_nat_out_edit.php
+++ b/usr/local/www/firewall_nat_out_edit.php
@@ -485,7 +485,7 @@ function poolopts_change() {
<td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol");?></td>
<td width="78%" class="vtable">
<select name="protocol" class="formselect" onchange="proto_change();">
- <?php $protocols = explode(" ", "any TCP UDP TCP/UDP ICMP ESP AH GRE IGMP carp pfsync");
+ <?php $protocols = explode(" ", "any TCP UDP TCP/UDP ICMP ESP AH GRE IPV6 IGMP carp pfsync");
foreach ($protocols as $proto): ?>
<option value="<?=strtolower($proto);?>" <?php if (strtolower($proto) == $pconfig['protocol']) echo "selected=\"selected\""; ?>><?=htmlspecialchars($proto);?></option>
<?php endforeach; ?>
@@ -720,7 +720,7 @@ $has_updated_time = (isset($a_out[$id]['updated']) && is_array($a_out[$id]['upda
poolopts_change();
var addressarray = <?= json_encode(get_alias_list(array("host", "network", "openvpn", "urltable"))) ?>;
- var customarray = <?= json_encode(get_alias_list("port")) ?>;
+ var customarray = <?= json_encode(get_alias_list(array("port", "url_ports", "urltable_ports"))) ?>;
var oTextbox1 = new AutoSuggestControl(document.getElementById("source"), new StateSuggestions(addressarray));
var oTextbox2 = new AutoSuggestControl(document.getElementById("sourceport"), new StateSuggestions(customarray));
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 4105343..25b3e9d 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -858,7 +858,7 @@ include("head.inc");
<td width="78%" class="vtable">
<select <?=$edit_disabled;?> name="proto" class="formselect" onchange="proto_change()">
<?php
- $protocols = explode(" ", "TCP UDP TCP/UDP ICMP ESP AH GRE IGMP OSPF any carp pfsync");
+ $protocols = explode(" ", "TCP UDP TCP/UDP ICMP ESP AH GRE IPV6 IGMP OSPF any carp pfsync");
foreach ($protocols as $proto): ?>
<option value="<?=strtolower($proto);?>" <?php if (strtolower($proto) == $pconfig['proto']) echo "selected=\"selected\""; ?>><?=htmlspecialchars($proto);?></option>
<?php endforeach; ?>
@@ -1629,7 +1629,7 @@ $has_updated_time = (isset($a_filter[$id]['updated']) && is_array($a_filter[$id]
<?php endif; ?>
var addressarray = <?= json_encode(get_alias_list(array("host", "network", "openvpn", "urltable"))) ?>;
- var customarray = <?= json_encode(get_alias_list("port")) ?>;
+ var customarray = <?= json_encode(get_alias_list(array("port", "url_ports", "urltable_ports"))) ?>;
var oTextbox1 = new AutoSuggestControl(document.getElementById("src"), new StateSuggestions(addressarray));
var oTextbox2 = new AutoSuggestControl(document.getElementById("srcbeginport_cust"), new StateSuggestions(customarray));
diff --git a/usr/local/www/firewall_virtual_ip.php b/usr/local/www/firewall_virtual_ip.php
index 2a17a9e..784d1bf 100755
--- a/usr/local/www/firewall_virtual_ip.php
+++ b/usr/local/www/firewall_virtual_ip.php
@@ -107,14 +107,19 @@ if ($_GET['act'] == "del") {
}
}
- if (is_ipaddrv6($a_vip[$_GET['id']]['subnet']))
+ if (is_ipaddrv6($a_vip[$_GET['id']]['subnet'])) {
+ $is_ipv6 = true;
$subnet = gen_subnetv6($a_vip[$_GET['id']]['subnet'], $a_vip[$_GET['id']]['subnet_bits']);
- else
+ $if_subnet = gen_subnetv6(get_interface_ipv6($a_vip[$_GET['id']]['interface']), get_interface_subnetv6($a_vip[$_GET['id']]['interface']));
+ } else {
+ $is_ipv6 = false;
$subnet = gen_subnet($a_vip[$_GET['id']]['subnet'], $a_vip[$_GET['id']]['subnet_bits']);
+ $if_subnet = gen_subnet(get_interface_ip($a_vip[$_GET['id']]['interface']), get_interface_subnet($a_vip[$_GET['id']]['interface']));
+ }
$subnet .= "/" . $a_vip[$_GET['id']]['subnet_bits'];
+ $if_subnet .= "/" . $if_subnet_bits;
- $is_ipv6 = is_ipaddrv6($a_vip[$_GET['id']]['subnet']);
if (is_array($config['gateways']['gateway_item']))
foreach($config['gateways']['gateway_item'] as $gateway) {
if ($a_vip[$_GET['id']]['interface'] != $gateway['interface'])
@@ -123,6 +128,8 @@ if ($_GET['act'] == "del") {
continue;
if (!$is_ipv6 && $gateway['ipprotocol'] == 'inet6')
continue;
+ if (ip_in_subnet($gateway['gateway'], $if_subnet))
+ continue;
if (ip_in_subnet($gateway['gateway'], $subnet)) {
$input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one Gateway.");
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc
index 3e9be44..f88572b 100755
--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -108,9 +108,16 @@ $firewall_rules_dscp_types = array("af11",
"af42",
"af43",
"EF",
- "1-64",
- "0x10",
- "0x04-0xfc");
+ "cs1",
+ "cs2",
+ "cs3",
+ "cs4",
+ "cs5",
+ "cs6",
+ "cs7",
+ "0x01 (reliability, ToS 0x04)",
+ "0x02 (throughput, ToS 0x08)",
+ "0x04 (lowdelay, ToS 0x10)");
$auth_server_types = array(
'ldap' => "LDAP",
@@ -1023,9 +1030,16 @@ function alias_info_popup($alias_id){
$alias_name=$config['aliases']['alias'][$alias_id];
$alias_objects_with_details = "<table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" summary=\"alias info popup\">";
if ($alias_name['url']) {
- exec("/sbin/pfctl -t {$alias_name['name']} -T show | wc -l", $total_entries);
- $counter=preg_replace("/\D/","",$total_entries[0]);
- exec("/sbin/pfctl -t {$alias_name['name']} -T show | head -10002", $alias_addresses);
+ // TODO: Change it when pf supports tables with ports
+ if ($alias_name['type'] == "urltable") {
+ exec("/sbin/pfctl -t {$alias_name['name']} -T show | wc -l", $total_entries);
+ $counter=preg_replace("/\D/","",$total_entries[0]);
+ exec("/sbin/pfctl -t {$alias_name['name']} -T show | head -10002", $alias_addresses);
+ } else {
+ $urlfn = alias_expand_urltable($alias_name['name']);
+ $alias_addresses = explode("\n", file_get_contents($urlfn));
+ $counter = count($alias_addresses);
+ }
$alias_objects_with_details .= "<tr><td colspan=\"3\" $close_title class=\"vncell\">{$alias_name['url']}</td></tr>";
$x=0;
foreach ($alias_addresses as $alias_ports_address ) {
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 7e5d97d..9e888f3 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -4,7 +4,7 @@
interfaces.php
Copyright (C) 2004-2008 Scott Ullrich
Copyright (C) 2006 Daniel S. Haischt.
- Copyright (C) 2008-2010 Ermal Luçi
+ Copyright (C) 2008-2010 Ermal Luçi
All rights reserved.
originally part of m0n0wall (http://m0n0.ch/wall)
@@ -176,6 +176,60 @@ $pconfig['dhcphostname'] = $wancfg['dhcphostname'];
$pconfig['alias-address'] = $wancfg['alias-address'];
$pconfig['alias-subnet'] = $wancfg['alias-subnet'];
$pconfig['dhcprejectfrom'] = $wancfg['dhcprejectfrom'];
+
+$pconfig['adv_dhcp_pt_timeout'] = $wancfg['adv_dhcp_pt_timeout'];
+$pconfig['adv_dhcp_pt_retry'] = $wancfg['adv_dhcp_pt_retry'];
+$pconfig['adv_dhcp_pt_select_timeout'] = $wancfg['adv_dhcp_pt_select_timeout'];
+$pconfig['adv_dhcp_pt_reboot'] = $wancfg['adv_dhcp_pt_reboot'];
+$pconfig['adv_dhcp_pt_backoff_cutoff'] = $wancfg['adv_dhcp_pt_backoff_cutoff'];
+$pconfig['adv_dhcp_pt_initial_interval'] = $wancfg['adv_dhcp_pt_initial_interval'];
+
+$pconfig['adv_dhcp_pt_values'] = $wancfg['adv_dhcp_pt_values'];
+
+$pconfig['adv_dhcp_send_options'] = $wancfg['adv_dhcp_send_options'];
+$pconfig['adv_dhcp_request_options'] = $wancfg['adv_dhcp_request_options'];
+$pconfig['adv_dhcp_required_options'] = $wancfg['adv_dhcp_required_options'];
+$pconfig['adv_dhcp_option_modifiers'] = $wancfg['adv_dhcp_option_modifiers'];
+
+$pconfig['adv_dhcp_config_advanced'] = $wancfg['adv_dhcp_config_advanced'];
+$pconfig['adv_dhcp_config_file_override'] = $wancfg['adv_dhcp_config_file_override'];
+$pconfig['adv_dhcp_config_file_override_path'] = $wancfg['adv_dhcp_config_file_override_path'];
+
+$pconfig['adv_dhcp6_interface_statement_send_options'] = $wancfg['adv_dhcp6_interface_statement_send_options'];
+$pconfig['adv_dhcp6_interface_statement_request_options'] = $wancfg['adv_dhcp6_interface_statement_request_options'];
+$pconfig['adv_dhcp6_interface_statement_information_only_enable'] = $wancfg['adv_dhcp6_interface_statement_information_only_enable'];
+$pconfig['adv_dhcp6_interface_statement_script'] = $wancfg['adv_dhcp6_interface_statement_script'];
+
+$pconfig['adv_dhcp6_id_assoc_statement_address_enable'] = $wancfg['adv_dhcp6_id_assoc_statement_address_enable'];
+$pconfig['adv_dhcp6_id_assoc_statement_address'] = $wancfg['adv_dhcp6_id_assoc_statement_address'];
+$pconfig['adv_dhcp6_id_assoc_statement_address_id'] = $wancfg['adv_dhcp6_id_assoc_statement_address_id'];
+$pconfig['adv_dhcp6_id_assoc_statement_address_pltime'] = $wancfg['adv_dhcp6_id_assoc_statement_address_pltime'];
+$pconfig['adv_dhcp6_id_assoc_statement_address_vltime'] = $wancfg['adv_dhcp6_id_assoc_statement_address_vltime'];
+
+$pconfig['adv_dhcp6_id_assoc_statement_prefix_enable'] = $wancfg['adv_dhcp6_id_assoc_statement_prefix_enable'];
+$pconfig['adv_dhcp6_id_assoc_statement_prefix'] = $wancfg['adv_dhcp6_id_assoc_statement_prefix'];
+$pconfig['adv_dhcp6_id_assoc_statement_prefix_id'] = $wancfg['adv_dhcp6_id_assoc_statement_prefix_id'];
+$pconfig['adv_dhcp6_id_assoc_statement_prefix_pltime'] = $wancfg['adv_dhcp6_id_assoc_statement_prefix_pltime'];
+$pconfig['adv_dhcp6_id_assoc_statement_prefix_vltime'] = $wancfg['adv_dhcp6_id_assoc_statement_prefix_vltime'];
+
+$pconfig['adv_dhcp6_prefix_interface_statement_sla_id'] = $wancfg['adv_dhcp6_prefix_interface_statement_sla_id'];
+$pconfig['adv_dhcp6_prefix_interface_statement_sla_len'] = $wancfg['adv_dhcp6_prefix_interface_statement_sla_len'];
+
+$pconfig['adv_dhcp6_authentication_statement_authname'] = $wancfg['adv_dhcp6_authentication_statement_authname'];
+$pconfig['adv_dhcp6_authentication_statement_protocol'] = $wancfg['adv_dhcp6_authentication_statement_protocol'];
+$pconfig['adv_dhcp6_authentication_statement_algorithm'] = $wancfg['adv_dhcp6_authentication_statement_algorithm'];
+$pconfig['adv_dhcp6_authentication_statement_rdm'] = $wancfg['adv_dhcp6_authentication_statement_rdm'];
+
+$pconfig['adv_dhcp6_key_info_statement_keyname'] = $wancfg['adv_dhcp6_key_info_statement_keyname'];
+$pconfig['adv_dhcp6_key_info_statement_realm'] = $wancfg['adv_dhcp6_key_info_statement_realm'];
+$pconfig['adv_dhcp6_key_info_statement_keyid'] = $wancfg['adv_dhcp6_key_info_statement_keyid'];
+$pconfig['adv_dhcp6_key_info_statement_secret'] = $wancfg['adv_dhcp6_key_info_statement_secret'];
+$pconfig['adv_dhcp6_key_info_statement_expire'] = $wancfg['adv_dhcp6_key_info_statement_expire'];
+
+$pconfig['adv_dhcp6_config_advanced'] = $wancfg['adv_dhcp6_config_advanced'];
+$pconfig['adv_dhcp6_config_file_override'] = $wancfg['adv_dhcp6_config_file_override'];
+$pconfig['adv_dhcp6_config_file_override_path'] = $wancfg['adv_dhcp6_config_file_override_path'];
+
$pconfig['dhcp_plus'] = isset($wancfg['dhcp_plus']);
$pconfig['descr'] = remove_bad_chars($wancfg['descr']);
$pconfig['enable'] = isset($wancfg['enable']);
@@ -219,6 +273,7 @@ switch($wancfg['ipaddrv6']) {
$wancfg['dhcp6-ia-pd-len'] = "none";
$pconfig['dhcp6-ia-pd-len'] = $wancfg['dhcp6-ia-pd-len'];
$pconfig['type6'] = "dhcp6";
+ $pconfig['dhcp6prefixonly'] = isset($wancfg['dhcp6prefixonly']);
break;
case "6to4":
$pconfig['type6'] = "6to4";
@@ -746,11 +801,66 @@ if ($_POST['apply']) {
unset($wancfg['dhcprejectfrom']);
unset($wancfg['dhcp6-duid']);
unset($wancfg['dhcp6-ia-pd-len']);
+ unset($wancfg['dhcp6prefixonly']);
unset($wancfg['track6-interface']);
unset($wancfg['track6-prefix-id']);
unset($wancfg['prefix-6rd']);
unset($wancfg['prefix-6rd-v4plen']);
unset($wancfg['gateway-6rd']);
+
+ unset($wancfg['adv_dhcp_pt_timeout']);
+ unset($wancfg['adv_dhcp_pt_retry']);
+ unset($wancfg['adv_dhcp_pt_select_timeout']);
+ unset($wancfg['adv_dhcp_pt_reboot']);
+ unset($wancfg['adv_dhcp_pt_backoff_cutoff']);
+ unset($wancfg['adv_dhcp_pt_initial_interval']);
+
+ unset($wancfg['adv_dhcp_pt_values']);
+
+ unset($wancfg['adv_dhcp_send_options']);
+ unset($wancfg['adv_dhcp_request_options']);
+ unset($wancfg['adv_dhcp_required_options']);
+ unset($wancfg['adv_dhcp_option_modifiers']);
+
+ unset($wancfg['adv_dhcp_config_advanced']);
+ unset($wancfg['adv_dhcp_config_file_override']);
+ unset($wancfg['adv_dhcp_config_file_override_path']);
+
+ unset($wancfg['adv_dhcp6_interface_statement_send_options']);
+ unset($wancfg['adv_dhcp6_interface_statement_request_options']);
+ unset($wancfg['adv_dhcp6_interface_statement_information_only_enable']);
+ unset($wancfg['adv_dhcp6_interface_statement_script']);
+
+ unset($wancfg['adv_dhcp6_id_assoc_statement_address_enable']);
+ unset($wancfg['adv_dhcp6_id_assoc_statement_address']);
+ unset($wancfg['adv_dhcp6_id_assoc_statement_address_id']);
+ unset($wancfg['adv_dhcp6_id_assoc_statement_address_pltime']);
+ unset($wancfg['adv_dhcp6_id_assoc_statement_address_vltime']);
+
+ unset($wancfg['adv_dhcp6_id_assoc_statement_prefix_enable']);
+ unset($wancfg['adv_dhcp6_id_assoc_statement_prefix']);
+ unset($wancfg['adv_dhcp6_id_assoc_statement_prefix_id']);
+ unset($wancfg['adv_dhcp6_id_assoc_statement_prefix_pltime']);
+ unset($wancfg['adv_dhcp6_id_assoc_statement_prefix_vltime']);
+
+ unset($wancfg['adv_dhcp6_prefix_interface_statement_sla_id']);
+ unset($wancfg['adv_dhcp6_prefix_interface_statement_sla_len']);
+
+ unset($wancfg['adv_dhcp6_authentication_statement_authname']);
+ unset($wancfg['adv_dhcp6_authentication_statement_protocol']);
+ unset($wancfg['adv_dhcp6_authentication_statement_algorithm']);
+ unset($wancfg['adv_dhcp6_authentication_statement_rdm']);
+
+ unset($wancfg['adv_dhcp6_key_info_statement_keyname']);
+ unset($wancfg['adv_dhcp6_key_info_statement_realm']);
+ unset($wancfg['adv_dhcp6_key_info_statement_keyid']);
+ unset($wancfg['adv_dhcp6_key_info_statement_secret']);
+ unset($wancfg['adv_dhcp6_key_info_statement_expire']);
+
+ unset($wancfg['adv_dhcp6_config_advanced']);
+ unset($wancfg['adv_dhcp6_config_file_override']);
+ unset($wancfg['adv_dhcp6_config_file_override_path']);
+
unset($wancfg['pppoe_password']);
unset($wancfg['pptp_username']);
unset($wancfg['pptp_password']);
@@ -788,6 +898,25 @@ if ($_POST['apply']) {
$wancfg['alias-address'] = $_POST['alias-address'];
$wancfg['alias-subnet'] = $_POST['alias-subnet'];
$wancfg['dhcprejectfrom'] = $_POST['dhcprejectfrom'];
+
+ $wancfg['adv_dhcp_pt_timeout'] = $_POST['adv_dhcp_pt_timeout'];
+ $wancfg['adv_dhcp_pt_retry'] = $_POST['adv_dhcp_pt_retry'];
+ $wancfg['adv_dhcp_pt_select_timeout'] = $_POST['adv_dhcp_pt_select_timeout'];
+ $wancfg['adv_dhcp_pt_reboot'] = $_POST['adv_dhcp_pt_reboot'];
+ $wancfg['adv_dhcp_pt_backoff_cutoff'] = $_POST['adv_dhcp_pt_backoff_cutoff'];
+ $wancfg['adv_dhcp_pt_initial_interval'] = $_POST['adv_dhcp_pt_initial_interval'];
+
+ $wancfg['adv_dhcp_pt_values'] = $_POST['adv_dhcp_pt_values'];
+
+ $wancfg['adv_dhcp_send_options'] = $_POST['adv_dhcp_send_options'];
+ $wancfg['adv_dhcp_request_options'] = $_POST['adv_dhcp_request_options'];
+ $wancfg['adv_dhcp_required_options'] = $_POST['adv_dhcp_required_options'];
+ $wancfg['adv_dhcp_option_modifiers'] = $_POST['adv_dhcp_option_modifiers'];
+
+ $wancfg['adv_dhcp_config_advanced'] = $_POST['adv_dhcp_config_advanced'];
+ $wancfg['adv_dhcp_config_file_override'] = $_POST['adv_dhcp_config_file_override'];
+ $wancfg['adv_dhcp_config_file_override_path'] = $_POST['adv_dhcp_config_file_override_path'];
+
$wancfg['dhcp_plus'] = $_POST['dhcp_plus'] == "yes" ? true : false;
if($gateway_item) {
$a_gateways[] = $gateway_item;
@@ -882,6 +1011,44 @@ if ($_POST['apply']) {
$wancfg['ipaddrv6'] = "dhcp6";
$wancfg['dhcp6-duid'] = $_POST['dhcp6-duid'];
$wancfg['dhcp6-ia-pd-len'] = $_POST['dhcp6-ia-pd-len'];
+ if($_POST['dhcp6prefixonly'] == "yes")
+ $wancfg['dhcp6prefixonly'] = true;
+
+ $wancfg['adv_dhcp6_interface_statement_send_options'] = $_POST['adv_dhcp6_interface_statement_send_options'];
+ $wancfg['adv_dhcp6_interface_statement_request_options'] = $_POST['adv_dhcp6_interface_statement_request_options'];
+ $wancfg['adv_dhcp6_interface_statement_information_only_enable'] = $_POST['adv_dhcp6_interface_statement_information_only_enable'];
+ $wancfg['adv_dhcp6_interface_statement_script'] = $_POST['adv_dhcp6_interface_statement_script'];
+
+ $wancfg['adv_dhcp6_id_assoc_statement_address_enable'] = $_POST['adv_dhcp6_id_assoc_statement_address_enable'];
+ $wancfg['adv_dhcp6_id_assoc_statement_address'] = $_POST['adv_dhcp6_id_assoc_statement_address'];
+ $wancfg['adv_dhcp6_id_assoc_statement_address_id'] = $_POST['adv_dhcp6_id_assoc_statement_address_id'];
+ $wancfg['adv_dhcp6_id_assoc_statement_address_pltime'] = $_POST['adv_dhcp6_id_assoc_statement_address_pltime'];
+ $wancfg['adv_dhcp6_id_assoc_statement_address_vltime'] = $_POST['adv_dhcp6_id_assoc_statement_address_vltime'];
+
+ $wancfg['adv_dhcp6_id_assoc_statement_prefix_enable'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_enable'];
+ $wancfg['adv_dhcp6_id_assoc_statement_prefix'] = $_POST['adv_dhcp6_id_assoc_statement_prefix'];
+ $wancfg['adv_dhcp6_id_assoc_statement_prefix_id'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_id'];
+ $wancfg['adv_dhcp6_id_assoc_statement_prefix_pltime'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_pltime'];
+ $wancfg['adv_dhcp6_id_assoc_statement_prefix_vltime'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_vltime'];
+
+ $wancfg['adv_dhcp6_prefix_interface_statement_sla_id'] = $_POST['adv_dhcp6_prefix_interface_statement_sla_id'];
+ $wancfg['adv_dhcp6_prefix_interface_statement_sla_len'] = $_POST['adv_dhcp6_prefix_interface_statement_sla_len'];
+
+ $wancfg['adv_dhcp6_authentication_statement_authname'] = $_POST['adv_dhcp6_authentication_statement_authname'];
+ $wancfg['adv_dhcp6_authentication_statement_protocol'] = $_POST['adv_dhcp6_authentication_statement_protocol'];
+ $wancfg['adv_dhcp6_authentication_statement_algorithm'] = $_POST['adv_dhcp6_authentication_statement_algorithm'];
+ $wancfg['adv_dhcp6_authentication_statement_rdm'] = $_POST['adv_dhcp6_authentication_statement_rdm'];
+
+ $wancfg['adv_dhcp6_key_info_statement_keyname'] = $_POST['adv_dhcp6_key_info_statement_keyname'];
+ $wancfg['adv_dhcp6_key_info_statement_realm'] = $_POST['adv_dhcp6_key_info_statement_realm'];
+ $wancfg['adv_dhcp6_key_info_statement_keyid'] = $_POST['adv_dhcp6_key_info_statement_keyid'];
+ $wancfg['adv_dhcp6_key_info_statement_secret'] = $_POST['adv_dhcp6_key_info_statement_secret'];
+ $wancfg['adv_dhcp6_key_info_statement_expire'] = $_POST['adv_dhcp6_key_info_statement_expire'];
+
+ $wancfg['adv_dhcp6_config_advanced'] = $_POST['adv_dhcp6_config_advanced'];
+ $wancfg['adv_dhcp6_config_file_override'] = $_POST['adv_dhcp6_config_file_override'];
+ $wancfg['adv_dhcp6_config_file_override_path'] = $_POST['adv_dhcp6_config_file_override_path'];
+
if($gateway_item) {
$a_gateways[] = $gateway_item;
}
@@ -1716,7 +1883,12 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
<td colspan="2" style="padding: 0px;">
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="dhcp">
<tr>
- <td colspan="2" valign="top" class="listtopic"><?=gettext("DHCP client configuration"); ?></td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("DHCP client configuration &nbsp &nbsp " .
+ ' <input name="adv_dhcp_config_advanced" type="checkbox" id="adv_dhcp_config_advanced" value="" onClick="show_adv_dhcp_config(this)";> ' .
+ " Advanced &nbsp &nbsp " .
+ ' <input name="adv_dhcp_config_file_override" type="checkbox" id="adv_dhcp_config_file_override" value="" onClick="show_adv_dhcp_config(this)";> ' .
+ " Config File Override &nbsp &nbsp "); ?>
+ </td>
</tr>
<!-- Uncomment to expose DHCP+ in GUI
<tr>
@@ -1729,7 +1901,7 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
</td>
</tr>
-->
- <tr>
+ <tr style='display:none' name="show_basic_dhcphostname" id="show_basic_dhcphostname">
<td width="22%" valign="top" class="vncell"><?=gettext("Hostname"); ?></td>
<td width="78%" class="vtable">
<input name="dhcphostname" type="text" class="formfld unknown" id="dhcphostname" size="40" value="<?=htmlspecialchars($pconfig['dhcphostname']);?>" />
@@ -1739,7 +1911,7 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
"this (for client identification)."); ?>
</td>
</tr>
- <tr>
+ <tr style='display:none' name="show_basic_dhcpalias-address" id="show_basic_dhcpalias-address">
<td width="22%" valign="top" class="vncell"><?=gettext("Alias IPv4 address"); ?></td>
<td width="78%" class="vtable">
<input name="alias-address" type="text" class="formfld unknown" id="alias-address" size="20" value="<?=htmlspecialchars($pconfig['alias-address']);?>" />
@@ -1758,7 +1930,7 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
"DHCP client."); ?>
</td>
</tr>
- <tr>
+ <tr style='display:none' name="show_basic_dhcprejectlease" id="show_basic_dhcprejectlease">
<td width="22%" valign="top" class="vncell"><?=gettext("Reject Leases From"); ?></td>
<td width="78%" class="vtable">
<input name="dhcprejectfrom" type="text" class="formfld unknown" id="dhcprejectfrom" size="20" value="<?=htmlspecialchars($pconfig['dhcprejectfrom']);?>" />
@@ -1767,9 +1939,150 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
<?=gettext("this is useful for rejecting leases from cable modems that offer private IPs when they lose upstream sync."); ?>
</td>
</tr>
- <tr>
- <td colspan="2" valign="top" height="16"></td>
+
+ <tr style='display:none' name="show_adv_dhcp_protocol_timing" id="show_adv_dhcp_protocol_timing">
+ <td width="22%" valign="top" class="vncell"><?=gettext("<a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhclient.conf&sektion=5#PROTOCOL_TIMING>Protocol Timing</a>"); ?></td>
+ <td width="48%" class="vtable">
+ Timeout: <input name="adv_dhcp_pt_timeout" type="text" class="formfld unknown" id="adv_dhcp_pt_timeout" size="2" value="<?=htmlspecialchars($pconfig['adv_dhcp_pt_timeout']);?>" onChange="customdhcpptcheckradiobuton(document.iform.adv_dhcp_pt_values, '');">
+ Retry: <input name="adv_dhcp_pt_retry" type="text" class="formfld unknown" id="adv_dhcp_pt_retry" size="2" value="<?=htmlspecialchars($pconfig['adv_dhcp_pt_retry']);?>" onChange="customdhcpptcheckradiobuton(document.iform.adv_dhcp_pt_values, '');">
+ Select Timeout: <input name="adv_dhcp_pt_select_timeout" type="text" class="formfld unknown" id="adv_dhcp_pt_select_timeout" size="2" value="<?=htmlspecialchars($pconfig['adv_dhcp_pt_select_timeout']);?>" onChange="customdhcpptcheckradiobuton(document.iform.adv_dhcp_pt_values, '');">
+
+ &nbsp &nbsp &nbsp &nbsp
+ Presets: &nbsp
+ <input name="adv_dhcp_pt_values" type="radio" value="DHCP" unchecked enabled id="customdhcpptdhcpdefaults" onClick="customdhcpptsetvalues(this, iform);">FreeBSD Default &nbsp
+ <input name="adv_dhcp_pt_values" type="radio" value="Clear" unchecked enabled id="customdhcpptclear" onClick="customdhcpptsetvalues(this, iform);">Clear
+
+ <br>
+ Reboot: <input name="adv_dhcp_pt_reboot" type="text" class="formfld unknown" id="adv_dhcp_pt_reboot" size="2" value="<?=htmlspecialchars($pconfig['adv_dhcp_pt_reboot']);?>" onChange="customdhcpptcheckradiobuton(document.iform.adv_dhcp_pt_values, '');">
+ Backoff Cutoff: <input name="adv_dhcp_pt_backoff_cutoff" type="text" class="formfld unknown" id="adv_dhcp_pt_backoff_cutoff" size="2" value="<?=htmlspecialchars($pconfig['adv_dhcp_pt_backoff_cutoff']);?>" onChange="customdhcpptcheckradiobuton(document.iform.adv_dhcp_pt_values, '');">
+ Initial Interval: <input name="adv_dhcp_pt_initial_interval" type="text" class="formfld unknown" id="adv_dhcp_pt_initial_interval" size="2" value="<?=htmlspecialchars($pconfig['adv_dhcp_pt_initial_interval']);?>" onChange="customdhcpptcheckradiobuton(document.iform.adv_dhcp_pt_values, '');">
+
+ &nbsp &nbsp &nbsp &nbsp &nbsp
+ <input name="adv_dhcp_pt_values" type="radio" value="pfSense" unchecked enabled id="customdhcpptpfsensedefaults" onClick="customdhcpptsetvalues(this, iform);">pfSense Default &nbsp
+ <input name="adv_dhcp_pt_values" type="radio" value="SavedCfg" checked enabled id="customdhcpptsavedcfg" onClick="customdhcpptsetvalues(this, iform);">Saved Cfg
+
+ <br>
+ <?=gettext("The values in these fields are DHCP protocol timings used when requesting a lease. <br> " ); ?>
+
+ <script type="text/javascript">
+ function customdhcpptcheckradiobuton(T, BUTTON) {
+ for (var i = 0; i < T.length; i++) {
+ T[i].checked = false;
+ if (T[i].value == BUTTON) T[i].checked = true;
+ }
+ T.value = BUTTON;
+ }
+
+ function customdhcpptsetvalues(T, FORM) {
+ // timeout, retry, select-timeout, reboot, backoff-cutoff, initial-interval
+ if (T.value == "DHCP") customdhcpptsetvaluesnow(T, FORM, "60", "300", "0", "10", "120", "10");
+ if (T.value == "pfSense") customdhcpptsetvaluesnow(T, FORM, "60", "15", "0", "", "", "1");
+ if (T.value == "SavedCfg") customdhcpptsetvaluesnow(T, FORM, "<?=htmlspecialchars($pconfig['adv_dhcp_pt_timeout']);?>", "<?=htmlspecialchars($pconfig['adv_dhcp_pt_retry']);?>", "<?=htmlspecialchars($pconfig['adv_dhcp_pt_select_timeout']);?>", "<?=htmlspecialchars($pconfig['adv_dhcp_pt_reboot']);?>", "<?=htmlspecialchars($pconfig['adv_dhcp_pt_backoff_cutoff']);?>", "<?=htmlspecialchars($pconfig['adv_dhcp_pt_initial_interval']);?>");
+ if (T.value == "Clear") customdhcpptsetvaluesnow(T, FORM, "", "", "", "", "", "");
+ }
+
+ function customdhcpptsetvaluesnow(T, FORM, timeout, retry, selecttimeout, reboot, backoffcutoff, initialinterval) {
+ FORM.adv_dhcp_pt_timeout.value = timeout;
+ FORM.adv_dhcp_pt_retry.value = retry;
+ FORM.adv_dhcp_pt_select_timeout.value = selecttimeout;
+ FORM.adv_dhcp_pt_reboot.value = reboot;
+ FORM.adv_dhcp_pt_backoff_cutoff.value = backoffcutoff;
+ FORM.adv_dhcp_pt_initial_interval.value = initialinterval;
+
+ FORM.adv_dhcp_pt_values.value = T.value;
+ }
+
+ <!-- Set the adv_dhcp_pt_values radio button from saved config -->
+ var RADIOBUTTON_VALUE = "<?=htmlspecialchars($pconfig['adv_dhcp_pt_values']);?>";
+ if (RADIOBUTTON_VALUE == "") RADIOBUTTON_VALUE = "SavedCfg";
+ customdhcpptcheckradiobuton(document.iform.adv_dhcp_pt_values, RADIOBUTTON_VALUE);
+ </script>
+ </td>
+ </tr>
+
+ <tr style='display:none' name="show_adv_dhcp_lease_requirements_and_requests" id="show_adv_dhcp_lease_requirements_and_requests">
+ <td width="22%" valign="top" class="vncell"><?=gettext("<a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhclient.conf&sektion=5#LEASE_REQUIREMENTS_AND_REQUESTS>Lease Requirements and Requests</a>"); ?></td>
+ <td width="78%" class="vtable">
+ <?=gettext("<a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhclient.conf&sektion=5#LEASE_REQUIREMENTS_AND_REQUESTS>Send</a> <a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhcp-options&sektion=5>Options</a>"); ?><br>
+ <input name="adv_dhcp_send_options" type="text" class="formfld unknown" id="adv_dhcp_send_options" size="86" value="<?=htmlspecialchars($pconfig['adv_dhcp_send_options']);?>">
+ <br>
+ <?=gettext("The values in this field are DHCP options to be sent when requesting a DHCP lease. [option declaration [, ...]] <br>" .
+ "Value Substitutions: {interface}, {hostname}, {mac_addr_asciiCD}, {mac_addr_hexCD} <br>" .
+ "Where C is U(pper) or L(ower) Case, and D is \" :-.\" Delimiter (space, colon, hyphen, or period) (omitted for none). <br>" .
+ "Some ISPs may require certain options be or not be sent. "); ?>
+ <hr>
+ <?=gettext("<a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhclient.conf&sektion=5#LEASE_REQUIREMENTS_AND_REQUESTS>Request</a> <a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhcp-options&sektion=5>Options</a>"); ?><br>
+ <input name="adv_dhcp_request_options" type="text" class="formfld unknown" id="adv_dhcp_request_options" size="86" value="<?=htmlspecialchars($pconfig['adv_dhcp_request_options']);?>">
+ <br>
+ <?=gettext("The values in this field are DHCP option 55 to be sent when requesting a DHCP lease. [option [, ...]] <br>" .
+ "Some ISPs may require certain options be or not be requested. "); ?>
+ <hr>
+ <?=gettext("<a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhclient.conf&sektion=5#LEASE_REQUIREMENTS_AND_REQUESTS>Require</a> <a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhcp-options&sektion=5>Options</a>"); ?><br>
+ <input name="adv_dhcp_required_options" type="text" class="formfld unknown" id="adv_dhcp_required_options" size="86" value="<?=htmlspecialchars($pconfig['adv_dhcp_required_options']);?>">
+ <br>
+ <?=gettext("The values in this field are DHCP options required by the client when requesting a DHCP lease. [option [, ...]] "); ?>
+ </td>
+ </tr>
+
+ <tr style='display:none' name="show_adv_dhcp_option_modifiers" id="show_adv_dhcp_option_modifiers">
+ <td width="22%" valign="top" class="vncell"><?=gettext("<a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhcp-options&sektion=5>Option</a> <a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhclient.conf&sektion=5#OPTION_MODIFIERS>Modifiers</a>"); ?></td>
+ <td width="78%" class="vtable">
+ <input name="adv_dhcp_option_modifiers" type="text" class="formfld unknown" id="adv_dhcp_option_modifiers" size="86" value="<?=htmlspecialchars($pconfig['adv_dhcp_option_modifiers']);?>">
+ <br>
+ <?=gettext("The values in this field are DHCP option modifiers applied to obtained DHCP lease. [modifier option declaration [, ...]] <br> " .
+ "modifiers: (default, supersede, prepend, append)"); ?>
+ </td>
+ </tr>
+
+ <tr style='display:none' name="show_adv_dhcp_config_file_override" id="show_adv_dhcp_config_file_override">
+ <td width="22%" valign="top" class="vncell"><?=gettext("<a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhclient.conf&sektion=5>Configuration File</a> Override"); ?></td>
+ <td width="78%" class="vtable">
+ <input name="adv_dhcp_config_file_override_path" type="text" class="formfld unknown" id="adv_dhcp_config_file_override_path" size="86" value="<?=htmlspecialchars($pconfig['adv_dhcp_config_file_override_path']);?>">
+ <br>
+ <?=gettext("The value in this field is the full absolute path to a DHCP client configuration file. [/[dirname/[.../]]filename[.ext]] <br> " .
+ "Value Substitutions in Config File: {interface}, {hostname}, {mac_addr_asciiCD}, {mac_addr_hexCD} <br>" .
+ "Where C is U(pper) or L(ower) Case, and D is \" :-.\" Delimiter (space, colon, hyphen, or period) (omitted for none). <br>" .
+ "Some ISPs may require certain options be or not be sent. "); ?>
+ </td>
</tr>
+
+ <tr>
+ <td colspan="2" valign="top" height="16"></td>
+ </tr>
+
+ <script type="text/javascript">
+ function show_adv_dhcp_config(T) {
+
+ if (T.checked) T.value = "Selected";
+ else T.value = "";
+
+ if (document.iform.adv_dhcp_config_file_override.checked) show_hide_adv_dhcp('none', 'none', '');
+ else if (document.iform.adv_dhcp_config_advanced.checked) show_hide_adv_dhcp('', '', 'none');
+ else show_hide_adv_dhcp('', 'none', 'none');
+ }
+
+ function show_hide_adv_dhcp(basic, advanced, override) {
+
+ document.getElementById("show_basic_dhcphostname").style.display = basic;
+ document.getElementById("show_basic_dhcpalias-address").style.display = basic;
+ document.getElementById("show_basic_dhcprejectlease").style.display = basic;
+
+ document.getElementById("show_adv_dhcp_protocol_timing").style.display = advanced;
+ document.getElementById("show_adv_dhcp_lease_requirements_and_requests").style.display = advanced;
+ document.getElementById("show_adv_dhcp_option_modifiers").style.display = advanced;
+
+ document.getElementById("show_adv_dhcp_config_file_override").style.display = override;
+ }
+
+ <!-- Set the adv_dhcp_config_advanced checkbox from saved config -->
+ if ("<?=htmlspecialchars($pconfig['adv_dhcp_config_advanced']);?>" == "Selected") document.iform.adv_dhcp_config_advanced.checked = true;
+ show_adv_dhcp_config(document.iform.adv_dhcp_config_advanced);
+
+ <!-- Set the adv_dhcp_config_file_override checkbox from saved config -->
+ if ("<?=htmlspecialchars($pconfig['adv_dhcp_config_file_override']);?>" == "Selected") document.iform.adv_dhcp_config_file_override.checked = true;
+ show_adv_dhcp_config(document.iform.adv_dhcp_config_file_override);
+ </script>
+
</table>
</td>
</tr>
@@ -1777,10 +2090,15 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
<td colspan="2" style="padding: 0px;">
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="dhcp6">
<tr>
- <td colspan="2" valign="top" class="listtopic"><?=gettext("DHCP6 client configuration"); ?></td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("DHCP6 client configuration &nbsp &nbsp " .
+ ' <input name="adv_dhcp6_config_advanced" type="checkbox" id="adv_dhcp6_config_advanced" value="" onClick="show_adv_dhcp6_config(this)";> ' .
+ " Advanced &nbsp &nbsp " .
+ ' <input name="adv_dhcp6_config_file_override" type="checkbox" id="adv_dhcp6_config_file_override" value="" onClick="show_adv_dhcp6_config(this)";> ' .
+ " Config File Override &nbsp &nbsp "); ?>
+ </td>
</tr>
<!--- Leave commented out for now
- <tr>
+ <tr style='display:none' name="basicdhcp6_show_dhcp6_duid" id="basicdhcp6_show_dhcp6_duid">
<td width="22%" valign="top" class="vncell"><?=gettext("DHCPv6 Unique Identifier (DUID)"); ?></td>
<td width="78%" class="vtable">
<input name="dhcp6-duid" type="text" class="formfld unknown" id="dhcp6-duid" size="40" value="<?=htmlspecialchars($pconfig['dhcp6-duid']);?>" />
@@ -1796,7 +2114,14 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
</td>
</tr>
-->
- <tr>
+ <tr style='display:none' name="basicdhcp6_show_dhcp6_prefix_only" id="basicdhcp6_show_dhcp6_prefix_only">
+ <td width="22%" valign="top" class="vncell"><?=gettext("Request only a IPv6 prefix"); ?></td>
+ <td width="78%" class="vtable">
+ <input name="dhcp6prefixonly" type="checkbox" value="yes" <?php if ($pconfig['dhcp6prefixonly'] == true) echo "checked=\"checked\""; ?> />
+ <?=gettext("Only request a IPv6 prefix, do not request a IPv6 address"); ?>
+ </td>
+ </tr>
+ <tr style='display:none' name="basicdhcp6_show_dhcp6_prefix_delegation_size" id="basicdhcp6_show_dhcp6_prefix_delegation_size">
<td width="22%" valign="top" class="vncell"><?=gettext("DHCPv6 Prefix Delegation size"); ?></td>
<td width="78%" class="vtable">
<select name="dhcp6-ia-pd-len" class="formselect" id="dhcp6-ia-pd-len">
@@ -1813,9 +2138,204 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
<?=gettext("The value in this field is the delegated prefix length provided by the DHCPv6 server. Normally specified by the ISP."); ?>
</td>
</tr>
- <tr>
- <td colspan="2" valign="top" height="16"></td>
+
+ <tr style='display:none' name="show_adv_dhcp6_interface_statement" id="show_adv_dhcp6_interface_statement">
+ <td width="22%" valign="top" class="vncell">
+ <?=gettext("<a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhcp6c.conf&sektion=5&apropos=0&manpath=FreeBSD+Ports#Interface_statement>Interface Statement</a>"); ?>
+ <br><br>
+ <input name="adv_dhcp6_interface_statement_information_only_enable" type="checkbox" id="adv_dhcp6_interface_statement_information_only_enable" value="" onClick="show_adv_dhcp6_config(this)";>
+ <?=gettext("Information Only"); ?>
+ </td>
+ <td width="78%" class="vtable">
+ <?=gettext("Send Options"); ?><br>
+ <input name="adv_dhcp6_interface_statement_send_options" type="text" class="formfld unknown" id="adv_dhcp6_interface_statement_send_options" size="86" value="<?=htmlspecialchars($pconfig['adv_dhcp6_interface_statement_send_options']);?>">
+ <br>
+ <?=gettext("The values in this field are DHCP send options to be sent when requesting a DHCP lease. [option declaration [, ...]] <br>" .
+ "Value Substitutions: {interface}, {hostname}, {mac_addr_asciiCD}, {mac_addr_hexCD} <br>" .
+ "Where C is U(pper) or L(ower) Case, and D is \" :-.\" Delimiter (space, colon, hyphen, or period) (omitted for none). <br>" .
+ "Some DHCP services may require certain options be or not be sent. "); ?>
+ <br>
+ <br>
+ <?=gettext("Request Options"); ?><br>
+ <input name="adv_dhcp6_interface_statement_request_options" type="text" class="formfld unknown" id="adv_dhcp6_interface_statement_request_options" size="86" value="<?=htmlspecialchars($pconfig['adv_dhcp6_interface_statement_request_options']);?>">
+ <br>
+ <?=gettext("The values in this field are DHCP request options to be sent when requesting a DHCP lease. [option [, ...]] <br>" .
+ "Some DHCP services may require certain options be or not be requested. "); ?>
+ <br>
+ <br>
+ <?=gettext("Script"); ?><br>
+ <input name="adv_dhcp6_interface_statement_script" type="text" class="formfld unknown" id="adv_dhcp6_interface_statement_script" size="86" value="<?=htmlspecialchars($pconfig['adv_dhcp6_interface_statement_script']);?>">
+ <br>
+ <?=gettext("The value in this field is the absolute path to a script invoked on certain conditions including when a reply message is received. <br>" .
+ "[/[dirname/[.../]]filename[.ext]] "); ?>
+ </td>
+ </tr>
+
+ <tr style='display:none' name="show_adv_dhcp6_id_assoc_statement" id="show_adv_dhcp6_id_assoc_statement">
+ <td width="22%" valign="top" class="vncell">
+ <?=gettext("<a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhcp6c.conf&sektion=5&apropos=0&manpath=FreeBSD+Ports#Identity_association_statement>Identity Association Statement</a>"); ?>
+ </td>
+ <td width="78%" class="vtable">
+
+ <input name="adv_dhcp6_id_assoc_statement_address_enable" type="checkbox" id="adv_dhcp6_id_assoc_statement_address_enable" value="" onClick="show_adv_dhcp6_config(this)";>
+ <?=gettext("Non-Temporary Address Allocation"); ?>
+ <div style='display:none' name="show_adv_dhcp6_id_assoc_statement_address" id="show_adv_dhcp6_id_assoc_statement_address">
+ <?=gettext("id-assoc na"); ?>
+ <?=gettext("<i>ID</i>"); ?>
+ <input name="adv_dhcp6_id_assoc_statement_address_id" type="text" class="formfld unknown" id="adv_dhcp6_id_assoc_statement_address_id" size="3" value="<?=htmlspecialchars($pconfig['adv_dhcp6_id_assoc_statement_address_id']);?>">
+ <br>
+ <?=gettext("Address"); ?>
+ <?=gettext("<i>ipv6-address</i>"); ?>
+ <input name="adv_dhcp6_id_assoc_statement_address" type="text" class="formfld unknown" id="adv_dhcp6_id_assoc_statement_address" size="34" value="<?=htmlspecialchars($pconfig['adv_dhcp6_id_assoc_statement_address']);?>">
+ <?=gettext("<i>pltime</i>"); ?>
+ <input name="adv_dhcp6_id_assoc_statement_address_pltime" type="text" class="formfld unknown" id="adv_dhcp6_id_assoc_statement_address_pltime" size="3" value="<?=htmlspecialchars($pconfig['adv_dhcp6_id_assoc_statement_address_pltime']);?>">
+ <?=gettext("<i>vltime</i>"); ?>
+ <input name="adv_dhcp6_id_assoc_statement_address_vltime" type="text" class="formfld unknown" id="adv_dhcp6_id_assoc_statement_address_vltime" size="3" value="<?=htmlspecialchars($pconfig['adv_dhcp6_id_assoc_statement_address_vltime']);?>">
+ </div>
+ <hr>
+
+ <input name="adv_dhcp6_id_assoc_statement_prefix_enable" type="checkbox" id="adv_dhcp6_id_assoc_statement_prefix_enable" value="" onClick="show_adv_dhcp6_config(this)";>
+ <?=gettext("Prefix Delegation"); ?>
+ <div style='display:none' name="show_adv_dhcp6_id_assoc_statement_prefix" id="show_adv_dhcp6_id_assoc_statement_prefix">
+ <?=gettext("id-assoc pd"); ?>
+ <?=gettext("<i>ID</i>"); ?>
+ <input name="adv_dhcp6_id_assoc_statement_prefix_id" type="text" class="formfld unknown" id="adv_dhcp6_id_assoc_statement_prefix_id" size="3" value="<?=htmlspecialchars($pconfig['adv_dhcp6_id_assoc_statement_prefix_id']);?>">
+ <br>
+ <?=gettext("Prefix"); ?>
+ <?=gettext("<i>ipv6-prefix</i>"); ?>
+ <input name="adv_dhcp6_id_assoc_statement_prefix" type="text" class="formfld unknown" id="adv_dhcp6_id_assoc_statement_prefix" size="37" value="<?=htmlspecialchars($pconfig['adv_dhcp6_id_assoc_statement_prefix']);?>">
+ <?=gettext("<i>pltime</i>"); ?>
+ <input name="adv_dhcp6_id_assoc_statement_prefix_pltime" type="text" class="formfld unknown" id="adv_dhcp6_id_assoc_statement_prefix_pltime" size="3" value="<?=htmlspecialchars($pconfig['adv_dhcp6_id_assoc_statement_prefix_pltime']);?>">
+ <?=gettext("<i>vltime</i>"); ?>
+ <input name="adv_dhcp6_id_assoc_statement_prefix_vltime" type="text" class="formfld unknown" id="adv_dhcp6_id_assoc_statement_prefix_vltime" size="3" value="<?=htmlspecialchars($pconfig['adv_dhcp6_id_assoc_statement_prefix_vltime']);?>">
+ </div>
+ </td>
+ </tr>
+
+ <tr style='display:none' name="show_adv_dhcp6_prefix_interface_statement" id="show_adv_dhcp6_prefix_interface_statement">
+ <td width="22%" valign="top" class="vncell">
+ <?=gettext("<a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhcp6c.conf&sektion=5&apropos=0&manpath=FreeBSD+Ports#Prefix_interface_statement>Prefix Interface Statement</a>"); ?>
+ </td>
+ <td width="78%" class="vtable">
+ <?=gettext("Prefix Interface "); ?>
+ <?=gettext("<i>sla-id</i>"); ?>
+ <input name="adv_dhcp6_prefix_interface_statement_sla_id" type="text" class="formfld unknown" id="adv_dhcp6_prefix_interface_statement_sla_id" size="3" value="<?=htmlspecialchars($pconfig['adv_dhcp6_prefix_interface_statement_sla_id']);?>">
+ <?=gettext("<i>sla-len</i>"); ?>
+ <input name="adv_dhcp6_prefix_interface_statement_sla_len" type="text" class="formfld unknown" id="adv_dhcp6_prefix_interface_statement_sla_len" size="3" value="<?=htmlspecialchars($pconfig['adv_dhcp6_prefix_interface_statement_sla_len']);?>">
+ </td>
+ </tr>
+
+ <tr style='display:none' name="show_adv_dhcp6_authentication_statement" id="show_adv_dhcp6_authentication_statement">
+ <td width="22%" valign="top" class="vncell">
+ <?=gettext("<a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhcp6c.conf&sektion=5&apropos=0&manpath=FreeBSD+Ports#Authentication_statement>Authentication Statement</a>"); ?>
+ </td>
+ <td width="78%" class="vtable">
+ <?=gettext("<i>authname</i>"); ?>
+ <input name="adv_dhcp6_authentication_statement_authname" type="text" class="formfld unknown" id="adv_dhcp6_authentication_statement_authname" size="10" value="<?=htmlspecialchars($pconfig['adv_dhcp6_authentication_statement_authname']);?>">
+ <?=gettext("<i>protocol</i>"); ?>
+ <input name="adv_dhcp6_authentication_statement_protocol" type="text" class="formfld unknown" id="adv_dhcp6_authentication_statement_protocol" size="6" value="<?=htmlspecialchars($pconfig['adv_dhcp6_authentication_statement_protocol']);?>">
+ <?=gettext("<i>algorithm</i>"); ?>
+ <input name="adv_dhcp6_authentication_statement_algorithm" type="text" class="formfld unknown" id="adv_dhcp6_authentication_statement_algorithm" size="8" value="<?=htmlspecialchars($pconfig['adv_dhcp6_authentication_statement_algorithm']);?>">
+ <?=gettext("<i>rdm</i>"); ?>
+ <input name="adv_dhcp6_authentication_statement_rdm" type="text" class="formfld unknown" id="adv_dhcp6_authentication_statement_rdm" size="9" value="<?=htmlspecialchars($pconfig['adv_dhcp6_authentication_statement_rdm']);?>">
+ </td>
+ </tr>
+
+ <tr style='display:none' name="show_adv_dhcp6_key_info_statement" id="show_adv_dhcp6_key_info_statement">
+ <td width="22%" valign="top" class="vncell">
+ <?=gettext("<a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhcp6c.conf&sektion=5&apropos=0&manpath=FreeBSD+Ports#Keyinfo_statement>Keyinfo Statement</a>"); ?>
+ </td>
+ <td width="78%" class="vtable">
+ <?=gettext("<i>keyname</i>"); ?>
+ <input name="adv_dhcp6_key_info_statement_keyname" type="text" class="formfld unknown" id="adv_dhcp6_key_info_statement_keyname" size="27" value="<?=htmlspecialchars($pconfig['adv_dhcp6_key_info_statement_keyname']);?>">
+ <?=gettext("<i>realm</i>"); ?>
+ <input name="adv_dhcp6_key_info_statement_realm" type="text" class="formfld unknown" id="adv_dhcp6_key_info_statement_realm" size="37" value="<?=htmlspecialchars($pconfig['adv_dhcp6_key_info_statement_realm']);?>">
+ <br>
+ <?=gettext("<i>keyid</i>"); ?>
+ <input name="adv_dhcp6_key_info_statement_keyid" type="text" class="formfld unknown" id="adv_dhcp6_key_info_statement_keyid" size="2" value="<?=htmlspecialchars($pconfig['adv_dhcp6_key_info_statement_keyid']);?>">
+ <?=gettext("<i>secret</i>"); ?>
+ <input name="adv_dhcp6_key_info_statement_secret" type="text" class="formfld unknown" id="adv_dhcp6_key_info_statement_secret" size="36" value="<?=htmlspecialchars($pconfig['adv_dhcp6_key_info_statement_secret']);?>">
+ <?=gettext("<i>expire</i>"); ?>
+ <input name="adv_dhcp6_key_info_statement_expire" type="text" class="formfld unknown" id="adv_dhcp6_key_info_statement_expire" size="15" value="<?=htmlspecialchars($pconfig['adv_dhcp6_key_info_statement_expire']);?>">
+ </td>
+ </tr>
+
+ <tr style='display:none' name="show_adv_dhcp6_config_file_override" id="show_adv_dhcp6_config_file_override">
+ <td width="22%" valign="top" class="vncell">
+ <?=gettext("<a target=FreeBSD DHCP href=http://www.freebsd.org/cgi/man.cgi?query=dhcp6c.conf&sektion=5&apropos=0&manpath=FreeBSD+Ports>Configuration File</a> Override"); ?>
+ </td>
+ <td width="78%" class="vtable">
+ <input name="adv_dhcp6_config_file_override_path" type="text" class="formfld unknown" id="adv_dhcp6_config_file_override_path" size="86" value="<?=htmlspecialchars($pconfig['adv_dhcp6_config_file_override_path']);?>">
+ <br>
+ <?=gettext("The value in this field is the full absolute path to a DHCP client configuration file. [/[dirname/[.../]]filename[.ext]] <br> " .
+ "Value Substitutions in Config File: {interface}, {hostname}, {mac_addr_asciiCD}, {mac_addr_hexCD} <br>" .
+ "Where C is U(pper) or L(ower) Case, and D is \" :-.\" Delimiter (space, colon, hyphen, or period) (omitted for none). <br>" .
+ "Some ISPs may require certain options be or not be sent. "); ?>
+ </td>
</tr>
+
+ <tr>
+ <td colspan="2" valign="top" height="16"></td>
+ </tr>
+
+ <script type="text/javascript">
+ function show_adv_dhcp6_config(T) {
+
+ if (T.checked) T.value = "Selected";
+ else T.value = "";
+
+ if (document.iform.adv_dhcp6_config_file_override.checked) show_hide_adv_dhcp6('none', 'none', '' );
+ else if (document.iform.adv_dhcp6_config_advanced.checked) show_hide_adv_dhcp6('none', '', 'none');
+ else show_hide_adv_dhcp6('', 'none', 'none');
+ }
+
+ function show_hide_adv_dhcp6(basic, advanced, override) {
+
+ document.getElementById("basicdhcp6_show_dhcp6_prefix_delegation_size").style.display = basic;
+ document.getElementById("basicdhcp6_show_dhcp6_prefix_only").style.display = basic;
+
+ document.getElementById("show_adv_dhcp6_interface_statement").style.display = advanced;
+ document.getElementById("show_adv_dhcp6_id_assoc_statement").style.display = advanced;
+
+ document.getElementById("show_adv_dhcp6_id_assoc_statement_address").style.display = 'none';
+ if (document.iform.adv_dhcp6_id_assoc_statement_address_enable.checked) {
+ document.getElementById("show_adv_dhcp6_id_assoc_statement_address").style.display = advanced;
+ }
+
+ document.getElementById("show_adv_dhcp6_id_assoc_statement_prefix").style.display = 'none';
+ document.getElementById("show_adv_dhcp6_prefix_interface_statement").style.display = 'none';
+ if (document.iform.adv_dhcp6_id_assoc_statement_prefix_enable.checked) {
+ document.getElementById("show_adv_dhcp6_id_assoc_statement_prefix").style.display = advanced;
+ document.getElementById("show_adv_dhcp6_prefix_interface_statement").style.display = advanced;
+ }
+
+ document.getElementById("show_adv_dhcp6_authentication_statement").style.display = advanced;
+ document.getElementById("show_adv_dhcp6_key_info_statement").style.display = advanced;
+
+ document.getElementById("show_adv_dhcp6_config_file_override").style.display = override;
+ }
+
+ <!-- Set the adv_dhcp6_config_advanced checkbox from saved config -->
+ if ("<?=htmlspecialchars($pconfig['adv_dhcp6_config_advanced']);?>" == "Selected") document.iform.adv_dhcp6_config_advanced.checked = true;
+ show_adv_dhcp6_config(document.iform.adv_dhcp6_config_advanced);
+
+ <!-- Set the adv_dhcp6_config_file_override checkbox from saved config -->
+ if ("<?=htmlspecialchars($pconfig['adv_dhcp6_config_file_override']);?>" == "Selected") document.iform.adv_dhcp6_config_file_override.checked = true;
+ show_adv_dhcp6_config(document.iform.adv_dhcp6_config_file_override);
+
+ <!-- Set the adv_dhcp6_interface_statement_information_only_enable checkbox from saved config -->
+ if ("<?=htmlspecialchars($pconfig['adv_dhcp6_interface_statement_information_only_enable']);?>" == "Selected") document.iform.adv_dhcp6_interface_statement_information_only_enable.checked = true;
+ show_adv_dhcp6_config(document.iform.adv_dhcp6_interface_statement_information_only_enable);
+
+ <!-- Set the adv_dhcp6_id_assoc_statement_address_enable checkbox from saved config -->
+ if ("<?=htmlspecialchars($pconfig['adv_dhcp6_id_assoc_statement_address_enable']);?>" == "Selected") document.iform.adv_dhcp6_id_assoc_statement_address_enable.checked = true;
+ show_adv_dhcp6_config(document.iform.adv_dhcp6_id_assoc_statement_address_enable);
+
+ <!-- Set the adv_dhcp6_id_assoc_statement_prefix_enable checkbox from saved config -->
+ if ("<?=htmlspecialchars($pconfig['adv_dhcp6_id_assoc_statement_prefix_enable']);?>" == "Selected") document.iform.adv_dhcp6_id_assoc_statement_prefix_enable.checked = true;
+ show_adv_dhcp6_config(document.iform.adv_dhcp6_id_assoc_statement_prefix_enable);
+ </script>
+
</table>
</td>
</tr>
diff --git a/usr/local/www/interfaces_gre_edit.php b/usr/local/www/interfaces_gre_edit.php
index 9715552..74b57d8 100644
--- a/usr/local/www/interfaces_gre_edit.php
+++ b/usr/local/www/interfaces_gre_edit.php
@@ -213,7 +213,7 @@ include("head.inc");
<td class="vtable">
<input name="link2" type="checkbox" id="link2" <?if ($pconfig['link2']) echo "checked=\"checked\"";?> />
<br/>
- <span class="vexpl"><?=gettext("Specify which WCCP encapsulation(version 1 or 2) method the tunnel should use");?></span></td>
+ <span class="vexpl"><?=gettext("Check this box for WCCP encapsulation version 2, or leave unchecked for version 1.");?></span></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
diff --git a/usr/local/www/load_balancer_pool_edit.php b/usr/local/www/load_balancer_pool_edit.php
index 32b2e4f..3eced6b 100755
--- a/usr/local/www/load_balancer_pool_edit.php
+++ b/usr/local/www/load_balancer_pool_edit.php
@@ -215,7 +215,7 @@ function clearcombo(){
</div>
<script type="text/javascript">
//<![CDATA[
- var addressarray = <?= json_encode(get_alias_list("port")) ?>;
+ var addressarray = <?= json_encode(get_alias_list(array("port", "url_ports", "urltable_ports"))) ?>;
var oTextbox1 = new AutoSuggestControl(document.getElementById("port"), new StateSuggestions(addressarray));
//]]>
</script>
diff --git a/usr/local/www/load_balancer_virtual_server_edit.php b/usr/local/www/load_balancer_virtual_server_edit.php
index b2e73b1..4b68b6e 100755
--- a/usr/local/www/load_balancer_virtual_server_edit.php
+++ b/usr/local/www/load_balancer_virtual_server_edit.php
@@ -186,7 +186,7 @@ include("head.inc");
<br><?=gettext("You may also specify a port alias listed in Firewall -&gt; Aliases here."); ?>
<script type="text/javascript">
//<![CDATA[
- var port_aliases = <?= json_encode(get_alias_list("port")) ?>;
+ var port_aliases = <?= json_encode(get_alias_list(array("port", "url_ports", "urltable_ports"))) ?>;
var oTextbox2 = new AutoSuggestControl(document.getElementById("port"), new StateSuggestions(port_aliases));
//]]>
</script>
diff --git a/usr/local/www/services_captiveportal_filemanager.php b/usr/local/www/services_captiveportal_filemanager.php
index aedd191..2c673a0 100755
--- a/usr/local/www/services_captiveportal_filemanager.php
+++ b/usr/local/www/services_captiveportal_filemanager.php
@@ -123,11 +123,11 @@ if ($_POST) {
}
} else if (($_GET['act'] == "del") && !empty($cpzone) && $a_element[$_GET['id']]) {
conf_mount_rw();
- unlink_if_exists($g['captiveportal_path'] . "/" . $a_element[$id]['name']);
+ @unlink("{$g['captiveportal_element_path']}/" . $a_element[$_GET['id']]['name']);
+ @unlink("{$g['captiveportal_path']}/" . $a_element[$_GET['id']]['name']);
+ conf_mount_ro();
unset($a_element[$_GET['id']]);
write_config();
- captiveportal_write_elements();
- conf_mount_ro();
header("Location: services_captiveportal_filemanager.php?zone={$cpzone}");
exit;
}
diff --git a/usr/local/www/services_dhcp_edit.php b/usr/local/www/services_dhcp_edit.php
index a66a360..a90c3a6 100755
--- a/usr/local/www/services_dhcp_edit.php
+++ b/usr/local/www/services_dhcp_edit.php
@@ -92,6 +92,7 @@ if (isset($_POST['id']))
if (isset($id) && $a_maps[$id]) {
$pconfig['mac'] = $a_maps[$id]['mac'];
+ $pconfig['cid'] = $a_maps[$id]['cid'];
$pconfig['hostname'] = $a_maps[$id]['hostname'];
$pconfig['ipaddr'] = $a_maps[$id]['ipaddr'];
$pconfig['filename'] = $a_maps[$id]['filename'];
@@ -111,6 +112,7 @@ if (isset($id) && $a_maps[$id]) {
$pconfig['tftp'] = $a_maps[$id]['tftp'];
} else {
$pconfig['mac'] = $_GET['mac'];
+ $pconfig['cid'] = $_GET['cid'];
$pconfig['hostname'] = $_GET['hostname'];
$pconfig['filename'] = $_GET['filename'];
$pconfig['rootpath'] = $_GET['rootpath'];
@@ -138,11 +140,15 @@ if ($_POST) {
$pconfig = $_POST;
/* input validation */
- $reqdfields = explode(" ", "mac");
- $reqdfieldsn = array(gettext("MAC address"));
+ $reqdfields = array();
+ $reqdfieldsn = array();
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
+ /* either MAC or Client-ID must be specified */
+ if (empty($_POST['mac']) && empty($_POST['cid']))
+ $input_errors[] = gettext("Either MAC address or Client identifier must be specified");
+
/* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */
$_POST['mac'] = strtolower(str_replace("-", ":", $_POST['mac']));
@@ -173,8 +179,8 @@ if ($_POST) {
if (isset($id) && ($a_maps[$id]) && ($a_maps[$id] === $mapent))
continue;
- if ((($mapent['hostname'] == $_POST['hostname']) && $mapent['hostname']) || ($mapent['mac'] == $_POST['mac'])) {
- $input_errors[] = gettext("This Hostname, IP or MAC address already exists.");
+ if ((($mapent['hostname'] == $_POST['hostname']) && $mapent['hostname']) || (($mapent['mac'] == $_POST['mac']) && $mapent['mac']) || (($mapent['cid'] == $_POST['cid']) && $mapent['cid'])) {
+ $input_errors[] = gettext("This Hostname, IP, MAC address or Client identifier already exists.");
break;
}
}
@@ -243,6 +249,7 @@ if ($_POST) {
if (!$input_errors) {
$mapent = array();
$mapent['mac'] = $_POST['mac'];
+ $mapent['cid'] = $_POST['cid'];
$mapent['ipaddr'] = $_POST['ipaddr'];
$mapent['hostname'] = $_POST['hostname'];
$mapent['descr'] = $_POST['descr'];
@@ -334,7 +341,7 @@ include("head.inc");
<td colspan="2" valign="top" class="listtopic"><?=gettext("Static DHCP Mapping");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("MAC address");?></td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("MAC address");?></td>
<td width="78%" class="vtable">
<input name="mac" type="text" class="formfld unknown" id="mac" size="30" value="<?=htmlspecialchars($pconfig['mac']);?>">
<?php
@@ -347,6 +354,11 @@ include("head.inc");
<span class="vexpl"><?=gettext("Enter a MAC address in the following format: ".
"xx:xx:xx:xx:xx:xx");?></span></td>
</tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Client identifier");?></td>
+ <td width="78%" class="vtable">
+ <input name="cid" type="text" class="formfld unknown" id="cid" size="30" value="<?=htmlspecialchars($pconfig['cid']);?>">
+ <span class="vexpl"><?=gettext("");?></span></td>
+ </tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("IP address");?></td>
<td width="78%" class="vtable">
diff --git a/usr/local/www/services_dyndns.php b/usr/local/www/services_dyndns.php
index 5049d63..6705406 100755
--- a/usr/local/www/services_dyndns.php
+++ b/usr/local/www/services_dyndns.php
@@ -139,6 +139,7 @@ include("head.inc");
<td class="listr">
<?php
$filename = "{$g['conf_path']}/dyndns_{$dyndns['interface']}{$dyndns['type']}" . escapeshellarg($dyndns['host']) . "{$dyndns['id']}.cache";
+ $filename_v6 = "{$g['conf_path']}/dyndns_{$dyndns['interface']}{$dyndns['type']}" . escapeshellarg($dyndns['host']) . "{$dyndns['id']}_v6.cache";
if (file_exists($filename)) {
$ipaddr = dyndnsCheckIP($dyndns['interface']);
$cached_ip_s = explode(":", file_get_contents($filename));
@@ -149,6 +150,16 @@ include("head.inc");
echo "<font color='green'>";
echo htmlspecialchars($cached_ip);
echo "</font>";
+ } else if (file_exists($filename_v6)) {
+ $ipv6addr = get_interface_ipv6($dyndns['interface']);
+ $cached_ipv6_s = explode("|", file_get_contents($filename_v6));
+ $cached_ipv6 = $cached_ipv6_s[0];
+ if ($ipv6addr <> $cached_ipv6)
+ echo "<font color='red'>";
+ else
+ echo "<font color='green'>";
+ echo htmlspecialchars($cached_ipv6);
+ echo "</font>";
} else {
echo "N/A";
}
diff --git a/usr/local/www/services_dyndns_edit.php b/usr/local/www/services_dyndns_edit.php
index f48cb90..d53dcf9 100644
--- a/usr/local/www/services_dyndns_edit.php
+++ b/usr/local/www/services_dyndns_edit.php
@@ -93,7 +93,7 @@ if ($_POST) {
$reqdfieldsn = array();
$reqdfields = array("type");
$reqdfieldsn = array(gettext("Service type"));
- if ($pconfig['type'] != "custom") {
+ if ($pconfig['type'] != "custom" && $pconfig['type'] != "custom-v6") {
$reqdfields[] = "host";
$reqdfieldsn[] = gettext("Hostname");
$reqdfields[] = "password";
@@ -134,7 +134,7 @@ if ($_POST) {
$dyndns['updateurl'] = $_POST['updateurl'];
// Trim hard-to-type but sometimes returned characters
$dyndns['resultmatch'] = trim($_POST['resultmatch'], "\t\n\r");
- $dyndns['type'] == "custom" ? $dyndns['requestif'] = $_POST['requestif'] : $dyndns['requestif'] = $_POST['interface'];
+ ($dyndns['type'] == "custom" || $dyndns['type'] == "custom-v6") ? $dyndns['requestif'] = $_POST['requestif'] : $dyndns['requestif'] = $_POST['interface'];
$dyndns['descr'] = $_POST['descr'];
$dyndns['force'] = isset($_POST['force']);
@@ -176,6 +176,7 @@ include("head.inc");
function _onTypeChange(type){
switch(type) {
case "custom":
+ case "custom-v6":
document.getElementById("_resulttr").style.display = '';
document.getElementById("_urltr").style.display = '';
document.getElementById("_requestiftr").style.display = '';
diff --git a/usr/local/www/services_rfc2136.php b/usr/local/www/services_rfc2136.php
index 3763182..f3c3488 100644
--- a/usr/local/www/services_rfc2136.php
+++ b/usr/local/www/services_rfc2136.php
@@ -76,13 +76,15 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="5%" class="listhdrr"></td>
- <td width="25%" class="listhdrr"><?=gettext("Hostname");?></td>
- <td width="60%" class="listhdr"><?=gettext("Description");?></td>
+ <td width="5%" class="listhdrr"><?=gettext("If");?></td>
+ <td width="15%" class="listhdrr"><?=gettext("Server");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Hostname");?></td>
+ <td width="25%" class="listhdrr"><?=gettext("Cached IP");?></td>
+ <td width="25%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list"></td>
</tr>
<?php $i = 0; foreach ($a_rfc2136 as $rfc2136): ?>
- <tr>
+ <tr ondblclick="document.location='services_rfc2136_edit.php?id=<?=$i;?>'">
<td class="listlr">
<?php
$iflist = get_configured_interface_with_descr();
@@ -100,11 +102,56 @@ include("head.inc");
<td class="listr">
<?php
if (!isset($rfc2136['enable']))
+ echo "<span class=\"gray\">".htmlspecialchars($rfc2136['server'])."</span>";
+ else
+ echo htmlspecialchars($rfc2136['server']);
+ ?>
+ </td>
+ <td class="listr">
+ <?php
+ if (!isset($rfc2136['enable']))
echo "<span class=\"gray\">".htmlspecialchars($rfc2136['host'])."</span>";
else
echo htmlspecialchars($rfc2136['host']);
?>
</td>
+ <td class="listr">
+ <?php
+ $filename = "{$g['conf_path']}/dyndns_{$rfc2136['interface']}_rfc2136_" . escapeshellarg($rfc2136['host']) . "_{$rfc2136['server']}.cache";
+ if (file_exists($filename)) {
+ echo "IPv4: ";
+ if (isset($rfc2136['usepublicip']))
+ $ipaddr = dyndnsCheckIP($rfc2136['interface']);
+ else
+ $ipaddr = get_interface_ip($rfc2136['interface']);
+ $cached_ip_s = explode("|", file_get_contents($filename));
+ $cached_ip = $cached_ip_s[0];
+ if ($ipaddr <> $cached_ip)
+ echo "<font color='red'>";
+ else
+ echo "<font color='green'>";
+ echo htmlspecialchars($cached_ip);
+ echo "</font>";
+ } else {
+ echo "IPv4: N/A";
+ }
+ echo "<br />";
+ if (file_exists("{$filename}.ipv6")) {
+ echo "IPv6: ";
+ $ipaddr = get_interface_ipv6($rfc2136['interface']);
+ $cached_ip_s = explode("|", file_get_contents("{$filename}.ipv6"));
+ $cached_ip = $cached_ip_s[0];
+ if ($ipaddr <> $cached_ip)
+ echo "<font color='red'>";
+ else
+ echo "<font color='green'>";
+ echo htmlspecialchars($cached_ip);
+ echo "</font>";
+ } else {
+ echo "IPv6: N/A";
+ }
+ ?>
+ </td>
<td class="listbg">
<?php
if (!isset($rfc2136['enable']))
@@ -120,7 +167,7 @@ include("head.inc");
</tr>
<?php $i++; endforeach; ?>
<tr>
- <td class="list" colspan="3">&nbsp;</td>
+ <td class="list" colspan="5">&nbsp;</td>
<td class="list"> <a href="services_rfc2136_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
</tr>
<tr>
diff --git a/usr/local/www/services_rfc2136_edit.php b/usr/local/www/services_rfc2136_edit.php
index e5b36d6..965940f 100644
--- a/usr/local/www/services_rfc2136_edit.php
+++ b/usr/local/www/services_rfc2136_edit.php
@@ -55,6 +55,7 @@ if (isset($id) && isset($a_rfc2136[$id])) {
$pconfig['server'] = $a_rfc2136[$id]['server'];
$pconfig['interface'] = $a_rfc2136[$id]['interface'];
$pconfig['usetcp'] = isset($a_rfc2136[$id]['usetcp']);
+ $pconfig['usepublicip'] = isset($a_rfc2136[$id]['usepublicip']);
$pconfig['descr'] = $a_rfc2136[$id]['descr'];
}
@@ -89,6 +90,7 @@ if ($_POST) {
$rfc2136['keydata'] = $_POST['keydata'];
$rfc2136['server'] = $_POST['server'];
$rfc2136['usetcp'] = $_POST['usetcp'] ? true : false;
+ $rfc2136['usepublicip'] = $_POST['usepublicip'] ? true : false;
$rfc2136['interface'] = $_POST['interface'];
$rfc2136['descr'] = $_POST['descr'];
@@ -99,7 +101,10 @@ if ($_POST) {
write_config(gettext("New/Edited RFC2136 dnsupdate entry was posted."));
- $retval = services_dnsupdate_process();
+ if ($_POST['Submit'] == gettext("Save & Force Update"))
+ $retval = services_dnsupdate_process("", $rfc2136['host'], true);
+ else
+ $retval = services_dnsupdate_process();
header("Location: services_rfc2136.php");
exit;
@@ -188,6 +193,13 @@ include("head.inc");
<input name="usetcp" type="checkbox" id="usetcp" value="<?=gettext("yes");?>" <?php if ($pconfig['usetcp']) echo "checked"; ?>>
<strong><?=gettext("Use TCP instead of UDP");?></strong></td>
</tr>
+ <tr>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Use Public IP");?></td>
+ <td width="78%" class="vtable">
+ <input name="usepublicip" type="checkbox" id="usepublicip" value="<?=gettext("yes");?>" <?php if ($pconfig['usepublicip']) echo "checked"; ?>>
+ <strong><?=gettext("If the interface IP is private, attempt to fetch and use the public IP instead.");?></strong>
+ </td>
+ </tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
@@ -197,8 +209,9 @@ include("head.inc");
<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)">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onClick="enable_change(true)">
<a href="services_rfc2136.php"><input name="Cancel" type="button" class="formbtn" value="<?=gettext("Cancel");?>"></a>
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save & Force Update");?>" onClick="enable_change(true)">
<?php if (isset($id) && $a_rfc2136[$id]): ?>
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>">
<?php endif; ?>
diff --git a/usr/local/www/status_dhcp_leases.php b/usr/local/www/status_dhcp_leases.php
index ab0e45a..6c2dc69 100755
--- a/usr/local/www/status_dhcp_leases.php
+++ b/usr/local/www/status_dhcp_leases.php
@@ -170,7 +170,8 @@ foreach($leases_content as $lease) {
while($f < $fcount) {
switch($data[$f]) {
case "failover":
- $pools[$p]['name'] = $data[$f+2];
+ $pools[$p]['name'] = trim($data[$f+2], '"');
+ $pools[$p]['name'] = "{$pools[$p]['name']} (" . convert_friendly_interface_to_friendly_descr(substr($pools[$p]['name'], 5)) . ")";
$pools[$p]['mystate'] = $data[$f+7];
$pools[$p]['peerstate'] = $data[$f+14];
$pools[$p]['mydate'] = $data[$f+10];
diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php
index 2cf22de..6f747d3 100755
--- a/usr/local/www/status_rrd_graph.php
+++ b/usr/local/www/status_rrd_graph.php
@@ -240,10 +240,10 @@ $graph_length = array(
"8hour" => 28800,
"day" => 86400,
"week" => 604800,
- "month" => 2764800,
- "quarter" => 8035200,
+ "month" => 2678400,
+ "quarter" => 7948800,
"year" => 31622400,
- "4year" => 126489600);
+ "4year" => 126230400);
$pgtitle = array(gettext("Status"),gettext("RRD Graphs"));
diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php
index fa3f43f..2e0e7dc 100644
--- a/usr/local/www/status_rrd_graph_img.php
+++ b/usr/local/www/status_rrd_graph_img.php
@@ -96,10 +96,10 @@ $scales[16070400] = "WEEK:1:MONTH:1:MONTH:1:0:%b";
$scales[42854400] = "MONTH:1:MONTH:1:MONTH:1:0:%b";
$archives = array();
-$archives[1] = 1000;
-$archives[5] = 1000;
-$archives[60] = 1000;
-$archives[720] = 3000;
+$archives[1] = 1200;
+$archives[5] = 720;
+$archives[60] = 1860;
+$archives[1440] = 3652;
$defOptions = array(
'to' => 1,
@@ -110,9 +110,9 @@ $defOptions = array(
);
/* always set the average to the highest value as a fallback */
-$average = 720 * 60;
+$average = 1440 * 60;
foreach($archives as $rra => $value) {
- $archivestart = $end - ($rra * 60 * $value);
+ $archivestart = $now - ($rra * 60 * $value);
if($archivestart <= $start) {
$average = $rra * 60;
break;
@@ -150,6 +150,16 @@ $havg = timeDiff($average, $defOptions);
$hperiod = timeDiff($seconds, $defOptions);
$data = true;
+/* Don't leave it up to RRD Tool to select the RRA and resolution to use. */
+/* Specify the RRA and resolution to use per the graph havg value. */
+switch ($havg) {
+ case "1 minute": $step = 60; break;
+ case "5 minutes": $step = 300; break;
+ case "1 hour": $step = 3600; break;
+ case "1 day": $step = 86400; break;
+ default: $step = 0; break;
+}
+
$rrddbpath = "/var/db/rrd/";
chdir($rrddbpath);
$databases = glob("*.rrd");
@@ -282,19 +292,19 @@ function timeDiff($time, $opt = array()) {
if((strstr($curdatabase, "-traffic.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
/* define graphcmd for traffic stats */
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
- $graphcmd .= "--start $start --end $end --vertical-label \"bits/sec\" ";
+ $graphcmd .= "--start $start --end $end --step $step --vertical-label \"bits/sec\" ";
$graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
$graphcmd .= "--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" ";
$graphcmd .= "--height 200 --width 620 ";
- $graphcmd .= "DEF:$curif-in_bytes_pass=$rrddbpath$curdatabase:inpass:AVERAGE ";
- $graphcmd .= "DEF:$curif-out_bytes_pass=$rrddbpath$curdatabase:outpass:AVERAGE ";
- $graphcmd .= "DEF:$curif-in_bytes_block=$rrddbpath$curdatabase:inblock:AVERAGE ";
- $graphcmd .= "DEF:$curif-out_bytes_block=$rrddbpath$curdatabase:outblock:AVERAGE ";
+ $graphcmd .= "DEF:$curif-in_bytes_pass=$rrddbpath$curdatabase:inpass:AVERAGE:step=$step ";
+ $graphcmd .= "DEF:$curif-out_bytes_pass=$rrddbpath$curdatabase:outpass:AVERAGE:step=$step ";
+ $graphcmd .= "DEF:$curif-in_bytes_block=$rrddbpath$curdatabase:inblock:AVERAGE:step=$step ";
+ $graphcmd .= "DEF:$curif-out_bytes_block=$rrddbpath$curdatabase:outblock:AVERAGE:step=$step ";
- $graphcmd .= "DEF:$curif-in6_bytes_pass=$rrddbpath$curdatabase:inpass6:AVERAGE ";
- $graphcmd .= "DEF:$curif-out6_bytes_pass=$rrddbpath$curdatabase:outpass6:AVERAGE ";
- $graphcmd .= "DEF:$curif-in6_bytes_block=$rrddbpath$curdatabase:inblock6:AVERAGE ";
- $graphcmd .= "DEF:$curif-out6_bytes_block=$rrddbpath$curdatabase:outblock6:AVERAGE ";
+ $graphcmd .= "DEF:$curif-in6_bytes_pass=$rrddbpath$curdatabase:inpass6:AVERAGE:step=$step ";
+ $graphcmd .= "DEF:$curif-out6_bytes_pass=$rrddbpath$curdatabase:outpass6:AVERAGE:step=$step ";
+ $graphcmd .= "DEF:$curif-in6_bytes_block=$rrddbpath$curdatabase:inblock6:AVERAGE:step=$step ";
+ $graphcmd .= "DEF:$curif-out6_bytes_block=$rrddbpath$curdatabase:outblock6:AVERAGE:step=$step ";
$graphcmd .= "CDEF:\"$curif-in_bits_pass=$curif-in_bytes_pass,8,*\" ";
$graphcmd .= "CDEF:\"$curif-out_bits_pass=$curif-out_bytes_pass,8,*\" ";
@@ -435,7 +445,7 @@ elseif(strstr($curdatabase, "-throughput.rrd")) {
/* define graphcmd for throughput stats */
/* this gathers all interface statistics, the database does not actually exist */
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
- $graphcmd .= "--start $start --end $end ";
+ $graphcmd .= "--start $start --end $end --step $step ";
$graphcmd .= "--vertical-label \"bits/sec\" ";
$graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
$graphcmd .= "--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" ";
@@ -459,10 +469,10 @@ elseif(strstr($curdatabase, "-throughput.rrd")) {
$graphtputbytb = "";
foreach($iflist as $ifname) {
/* collect all interface stats */
- $graphcmd .= "DEF:\"{$ifname}-in_bytes_pass={$rrddbpath}{$ifname}-traffic.rrd:inpass:AVERAGE\" ";
- $graphcmd .= "DEF:\"{$ifname}-out_bytes_pass={$rrddbpath}{$ifname}-traffic.rrd:outpass:AVERAGE\" ";
- $graphcmd .= "DEF:\"{$ifname}-in_bytes_block={$rrddbpath}{$ifname}-traffic.rrd:inblock:AVERAGE\" ";
- $graphcmd .= "DEF:\"{$ifname}-out_bytes_block={$rrddbpath}{$ifname}-traffic.rrd:outblock:AVERAGE\" ";
+ $graphcmd .= "DEF:\"{$ifname}-in_bytes_pass={$rrddbpath}{$ifname}-traffic.rrd:inpass:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"{$ifname}-out_bytes_pass={$rrddbpath}{$ifname}-traffic.rrd:outpass:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"{$ifname}-in_bytes_block={$rrddbpath}{$ifname}-traffic.rrd:inblock:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"{$ifname}-out_bytes_block={$rrddbpath}{$ifname}-traffic.rrd:outblock:AVERAGE:step=$step\" ";
$graphcmd .= "CDEF:\"{$ifname}-in_bytes={$ifname}-in_bytes_pass,{$ifname}-in_bytes_block,+\" ";
$graphcmd .= "CDEF:\"{$ifname}-out_bytes={$ifname}-out_bytes_pass,{$ifname}-out_bytes_block,+\" ";
@@ -562,20 +572,20 @@ elseif(strstr($curdatabase, "-throughput.rrd")) {
elseif((strstr($curdatabase, "-packets.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
/* define graphcmd for packets stats */
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
- $graphcmd .= "--start $start --end $end ";
+ $graphcmd .= "--start $start --end $end --step $step ";
$graphcmd .= "--vertical-label \"packets/sec\" ";
$graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
$graphcmd .= "--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" ";
$graphcmd .= "--height 200 --width 620 ";
- $graphcmd .= "DEF:\"$curif-in_pps_pass=$rrddbpath$curdatabase:inpass:AVERAGE\" ";
- $graphcmd .= "DEF:\"$curif-out_pps_pass=$rrddbpath$curdatabase:outpass:AVERAGE\" ";
- $graphcmd .= "DEF:\"$curif-in_pps_block=$rrddbpath$curdatabase:inblock:AVERAGE\" ";
- $graphcmd .= "DEF:\"$curif-out_pps_block=$rrddbpath$curdatabase:outblock:AVERAGE\" ";
+ $graphcmd .= "DEF:\"$curif-in_pps_pass=$rrddbpath$curdatabase:inpass:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"$curif-out_pps_pass=$rrddbpath$curdatabase:outpass:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"$curif-in_pps_block=$rrddbpath$curdatabase:inblock:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"$curif-out_pps_block=$rrddbpath$curdatabase:outblock:AVERAGE:step=$step\" ";
- $graphcmd .= "DEF:\"$curif-in6_pps_pass=$rrddbpath$curdatabase:inpass6:AVERAGE\" ";
- $graphcmd .= "DEF:\"$curif-out6_pps_pass=$rrddbpath$curdatabase:outpass6:AVERAGE\" ";
- $graphcmd .= "DEF:\"$curif-in6_pps_block=$rrddbpath$curdatabase:inblock6:AVERAGE\" ";
- $graphcmd .= "DEF:\"$curif-out6_pps_block=$rrddbpath$curdatabase:outblock6:AVERAGE\" ";
+ $graphcmd .= "DEF:\"$curif-in6_pps_pass=$rrddbpath$curdatabase:inpass6:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"$curif-out6_pps_pass=$rrddbpath$curdatabase:outpass6:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"$curif-in6_pps_block=$rrddbpath$curdatabase:inblock6:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"$curif-out6_pps_block=$rrddbpath$curdatabase:outblock6:AVERAGE:step=$step\" ";
$graphcmd .= "CDEF:\"$curif-in_pps=$curif-in_pps_pass,$curif-in_pps_block,+\" ";
$graphcmd .= "CDEF:\"$curif-out_pps=$curif-out_pps_pass,$curif-out_pps_block,+\" ";
@@ -688,14 +698,14 @@ elseif((strstr($curdatabase, "-packets.rrd")) && (file_exists("$rrddbpath$curdat
elseif((strstr($curdatabase, "-wireless.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
/* define graphcmd for packets stats */
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
- $graphcmd .= "--start $start --end $end ";
+ $graphcmd .= "--start $start --end $end --step $step ";
$graphcmd .= "--vertical-label \"snr/channel/rate\" ";
$graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
$graphcmd .= "--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" ";
$graphcmd .= "--height 200 --width 620 ";
- $graphcmd .= "DEF:\"$curif-snr=$rrddbpath$curdatabase:snr:AVERAGE\" ";
- $graphcmd .= "DEF:\"$curif-rate=$rrddbpath$curdatabase:rate:AVERAGE\" ";
- $graphcmd .= "DEF:\"$curif-channel=$rrddbpath$curdatabase:channel:AVERAGE\" ";
+ $graphcmd .= "DEF:\"$curif-snr=$rrddbpath$curdatabase:snr:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"$curif-rate=$rrddbpath$curdatabase:rate:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"$curif-channel=$rrddbpath$curdatabase:channel:AVERAGE:step=$step\" ";
$graphcmd .= "LINE2:\"$curif-snr#{$colorwireless[0]}:$curif-snr\" ";
$graphcmd .= "LINE2:\"$curif-rate#{$colorwireless[1]}:$curif-rate\" ";
$graphcmd .= "LINE2:\"$curif-channel#{$colorwireless[2]}:$curif-channel\" ";
@@ -721,12 +731,12 @@ elseif((strstr($curdatabase, "-wireless.rrd")) && (file_exists("$rrddbpath$curda
elseif((strstr($curdatabase, "-vpnusers.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
/* define graphcmd for vpn users stats */
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
- $graphcmd .= "--start $start --end $end ";
+ $graphcmd .= "--start $start --end $end --step $step ";
$graphcmd .= "--vertical-label \"users\" ";
$graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
$graphcmd .= "--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" ";
$graphcmd .= "--height 200 --width 620 ";
- $graphcmd .= "DEF:\"$curif-users=$rrddbpath$curdatabase:users:AVERAGE\" ";
+ $graphcmd .= "DEF:\"$curif-users=$rrddbpath$curdatabase:users:AVERAGE:step=$step\" ";
$graphcmd .= "LINE2:\"$curif-users#{$colorvpnusers[0]}:$curif-users\" ";
$graphcmd .= "COMMENT:\"\\n\" ";
$graphcmd .= "COMMENT:\"\t\t\t maximum\t\t average\t current\\n\" ";
@@ -740,16 +750,16 @@ elseif((strstr($curdatabase, "-vpnusers.rrd")) && (file_exists("$rrddbpath$curda
elseif((strstr($curdatabase, "-states.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
/* define graphcmd for states stats */
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
- $graphcmd .= "--start -$seconds -e -$average ";
+ $graphcmd .= "--start -$seconds -e -$average --step $step ";
$graphcmd .= "--vertical-label \"states, ip\" ";
$graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
$graphcmd .= "--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" ";
$graphcmd .= "--height 200 --width 620 ";
- $graphcmd .= "DEF:\"$curif-pfrate=$rrddbpath$curdatabase:pfrate:AVERAGE\" ";
- $graphcmd .= "DEF:\"$curif-pfstates=$rrddbpath$curdatabase:pfstates:AVERAGE\" ";
- $graphcmd .= "DEF:\"$curif-pfnat=$rrddbpath$curdatabase:pfnat:AVERAGE\" ";
- $graphcmd .= "DEF:\"$curif-srcip=$rrddbpath$curdatabase:srcip:AVERAGE\" ";
- $graphcmd .= "DEF:\"$curif-dstip=$rrddbpath$curdatabase:dstip:AVERAGE\" ";
+ $graphcmd .= "DEF:\"$curif-pfrate=$rrddbpath$curdatabase:pfrate:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"$curif-pfstates=$rrddbpath$curdatabase:pfstates:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"$curif-pfnat=$rrddbpath$curdatabase:pfnat:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"$curif-srcip=$rrddbpath$curdatabase:srcip:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"$curif-dstip=$rrddbpath$curdatabase:dstip:AVERAGE:step=$step\" ";
$graphcmd .= "CDEF:\"$curif-pfrate_t=$curif-pfrate,0,1000000,LIMIT,UN,0,$curif-pfrate,IF,$seconds,*\" ";
$graphcmd .= "LINE1:\"$curif-pfrate#{$colorstates[0]}:$curif-pfrate\" ";
$graphcmd .= "LINE1:\"$curif-pfstates#{$colorstates[1]}:$curif-pfstates\" ";
@@ -794,16 +804,16 @@ elseif((strstr($curdatabase, "-states.rrd")) && (file_exists("$rrddbpath$curdata
elseif((strstr($curdatabase, "-processor.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
/* define graphcmd for processor stats */
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
- $graphcmd .= "--start $start --end $end ";
+ $graphcmd .= "--start $start --end $end --step $step ";
$graphcmd .= "--vertical-label \"utilization, number\" ";
$graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
$graphcmd .= "--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" ";
$graphcmd .= "--height 200 --width 620 ";
- $graphcmd .= "DEF:\"user=$rrddbpath$curdatabase:user:AVERAGE\" ";
- $graphcmd .= "DEF:\"nice=$rrddbpath$curdatabase:nice:AVERAGE\" ";
- $graphcmd .= "DEF:\"system=$rrddbpath$curdatabase:system:AVERAGE\" ";
- $graphcmd .= "DEF:\"interrupt=$rrddbpath$curdatabase:interrupt:AVERAGE\" ";
- $graphcmd .= "DEF:\"processes=$rrddbpath$curdatabase:processes:AVERAGE\" ";
+ $graphcmd .= "DEF:\"user=$rrddbpath$curdatabase:user:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"nice=$rrddbpath$curdatabase:nice:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"system=$rrddbpath$curdatabase:system:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"interrupt=$rrddbpath$curdatabase:interrupt:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"processes=$rrddbpath$curdatabase:processes:AVERAGE:step=$step\" ";
$graphcmd .= "AREA:\"user#{$colorprocessor[0]}:user\" ";
$graphcmd .= "AREA:\"nice#{$colorprocessor[1]}:nice:STACK\" ";
$graphcmd .= "AREA:\"system#{$colorprocessor[2]}:system:STACK\" ";
@@ -846,16 +856,16 @@ elseif((strstr($curdatabase, "-processor.rrd")) && (file_exists("$rrddbpath$curd
elseif((strstr($curdatabase, "-memory.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
/* define graphcmd for memory usage stats */
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
- $graphcmd .= "--start $start --end $end ";
+ $graphcmd .= "--start $start --end $end --step $step ";
$graphcmd .= "--vertical-label \"utilization, percent\" ";
$graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
$graphcmd .= "--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" ";
$graphcmd .= "--height 200 --width 620 ";
- $graphcmd .= "DEF:\"active=$rrddbpath$curdatabase:active:AVERAGE\" ";
- $graphcmd .= "DEF:\"inactive=$rrddbpath$curdatabase:inactive:AVERAGE\" ";
- $graphcmd .= "DEF:\"free=$rrddbpath$curdatabase:free:AVERAGE\" ";
- $graphcmd .= "DEF:\"cache=$rrddbpath$curdatabase:cache:AVERAGE\" ";
- $graphcmd .= "DEF:\"wire=$rrddbpath$curdatabase:wire:AVERAGE\" ";
+ $graphcmd .= "DEF:\"active=$rrddbpath$curdatabase:active:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"inactive=$rrddbpath$curdatabase:inactive:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"free=$rrddbpath$curdatabase:free:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"cache=$rrddbpath$curdatabase:cache:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"wire=$rrddbpath$curdatabase:wire:AVERAGE:step=$step\" ";
$graphcmd .= "LINE2:\"active#{$colormemory[0]}:active\" ";
$graphcmd .= "LINE2:\"inactive#{$colormemory[1]}:inactive\" ";
$graphcmd .= "LINE2:\"free#{$colormemory[2]}:free\" ";
@@ -898,7 +908,7 @@ elseif((strstr($curdatabase, "-memory.rrd")) && (file_exists("$rrddbpath$curdata
elseif((strstr($curdatabase, "-queues.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
/* define graphcmd for queue stats */
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
- $graphcmd .= "--start $start --end $end ";
+ $graphcmd .= "--start $start --end $end --step $step ";
$graphcmd .= "--vertical-label \"bits/sec\" ";
$graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
$graphcmd .= "--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" ";
@@ -914,7 +924,7 @@ elseif((strstr($curdatabase, "-queues.rrd")) && (file_exists("$rrddbpath$curdata
foreach ($a_queues as $name => $q) {
$color = "$colorqueuesup[$t]";
if($t > 0) { $stack = ":STACK"; }
- $graphcmd .= "DEF:\"$name=$rrddbpath$curdatabase:$name:AVERAGE\" ";
+ $graphcmd .= "DEF:\"$name=$rrddbpath$curdatabase:$name:AVERAGE:step=$step\" ";
$graphcmd .= "CDEF:\"$name-bytes_out=$name,0,$speedlimit,LIMIT,UN,0,$name,IF\" ";
$graphcmd .= "CDEF:\"$name-bits_out=$name-bytes_out,8,*\" ";
$graphcmd .= "$AREA:\"$name-bits_out#${color}:$name$stack\" ";
@@ -927,7 +937,7 @@ elseif((strstr($curdatabase, "-queues.rrd")) && (file_exists("$rrddbpath$curdata
elseif((strstr($curdatabase, "-queuedrops.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
/* define graphcmd for queuedrop stats */
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
- $graphcmd .= "--start $start --end $end ";
+ $graphcmd .= "--start $start --end $end --step $step ";
$graphcmd .= "--vertical-label \"drops / sec\" ";
$graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
$graphcmd .= "--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" ";
@@ -943,7 +953,7 @@ elseif((strstr($curdatabase, "-queuedrops.rrd")) && (file_exists("$rrddbpath$cur
foreach ($a_queues as $name => $q) {
$color = "$colorqueuesdropup[$t]";
if($t > 0) { $stack = ":STACK"; }
- $graphcmd .= "DEF:\"$name=$rrddbpath$curdatabase:$name:AVERAGE\" ";
+ $graphcmd .= "DEF:\"$name=$rrddbpath$curdatabase:$name:AVERAGE:step=$step\" ";
$graphcmd .= "CDEF:\"$name-bytes_out=$name,0,$speedlimit,LIMIT,UN,0,$name,IF\" ";
$graphcmd .= "CDEF:\"$name-bits_out=$name-bytes_out,8,*\" ";
$graphcmd .= "CDEF:\"$name-bits_out_neg=$name-bits_out,$multiplier,*\" ";
@@ -957,14 +967,14 @@ elseif((strstr($curdatabase, "-queuedrops.rrd")) && (file_exists("$rrddbpath$cur
elseif((strstr($curdatabase, "-quality.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
/* make a link quality graphcmd, we only have WAN for now, others too follow */
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png \\
- --start $start --end $end \\
+ --start $start --end $end --step $step \\
--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" \\
--color SHADEA#eeeeee --color SHADEB#eeeeee \\
--vertical-label \"ms / %\" \\
--height 200 --width 620 \\
--lower-limit 0 \\
- DEF:delayraw=$rrddbpath$curdatabase:delay:AVERAGE \\
- DEF:loss=$rrddbpath$curdatabase:loss:AVERAGE \\
+ DEF:delayraw=$rrddbpath$curdatabase:delay:AVERAGE:step=$step \\
+ DEF:loss=$rrddbpath$curdatabase:loss:AVERAGE:step=$step \\
\"CDEF:delay=delayraw,1000,*\" \\
\"CDEF:roundavg=delay,PREV(delay),+,2,/\" \\
\"CDEF:loss10=loss,$multiplier,*\" \\
@@ -993,18 +1003,18 @@ elseif((strstr($curdatabase, "-quality.rrd")) && (file_exists("$rrddbpath$curdat
elseif((strstr($curdatabase, "spamd.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
/* graph a spamd statistics graph */
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png \\
- --start $start --end $end \\
+ --start $start --end $end --step $step \\
--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" \\
--color SHADEA#eeeeee --color SHADEB#eeeeee \\
--vertical-label=\"Conn / Time, sec.\" \\
--height 200 --width 620 --no-gridfit \\
--lower-limit 0 \\
- DEF:consmin=$rrddbpath$curdatabase:conn:MIN \\
- DEF:consavg=$rrddbpath$curdatabase:conn:AVERAGE \\
- DEF:consmax=$rrddbpath$curdatabase:conn:MAX \\
- DEF:timemin=$rrddbpath$curdatabase:time:MIN \\
- DEF:timeavg=$rrddbpath$curdatabase:time:AVERAGE \\
- DEF:timemax=$rrddbpath$curdatabase:time:MAX \\
+ DEF:consmin=$rrddbpath$curdatabase:conn:MIN:step=$step \\
+ DEF:consavg=$rrddbpath$curdatabase:conn:AVERAGE:step=$step \\
+ DEF:consmax=$rrddbpath$curdatabase:conn:MAX:step=$step \\
+ DEF:timemin=$rrddbpath$curdatabase:time:MIN:step=$step \\
+ DEF:timeavg=$rrddbpath$curdatabase:time:AVERAGE:step=$step \\
+ DEF:timemax=$rrddbpath$curdatabase:time:MAX:step=$step \\
\"CDEF:timeminadj=timemin,0,86400,LIMIT,UN,0,timemin,IF\" \\
\"CDEF:timeavgadj=timeavg,0,86400,LIMIT,UN,0,timeavg,IF\" \\
\"CDEF:timemaxadj=timemax,0,86400,LIMIT,UN,0,timemax,IF\" \\
@@ -1031,12 +1041,12 @@ elseif((strstr($curdatabase, "spamd.rrd")) && (file_exists("$rrddbpath$curdataba
}
elseif((strstr($curdatabase, "-cellular.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
- $graphcmd .= "--start $start --end $end ";
+ $graphcmd .= "--start $start --end $end --step $step ";
$graphcmd .= "--vertical-label \"signal\" ";
$graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
$graphcmd .= "--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" ";
$graphcmd .= "--height 200 --width 620 ";
- $graphcmd .= "DEF:\"$curif-rssi=$rrddbpath$curdatabase:rssi:AVERAGE\" ";
+ $graphcmd .= "DEF:\"$curif-rssi=$rrddbpath$curdatabase:rssi:AVERAGE:step=$step\" ";
$graphcmd .= "LINE2:\"$curif-rssi#{$colorwireless[0]}:$curif-rssi\" ";
$graphcmd .= "COMMENT:\"\\n\" ";
$graphcmd .= "COMMENT:\"\t\t maximum\t\t average\t current\\n\" ";
@@ -1050,7 +1060,7 @@ elseif((strstr($curdatabase, "-cellular.rrd")) && (file_exists("$rrddbpath$curda
elseif((strstr($curdatabase, "-loggedin.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
/* define graphcmd for online Captive Portal users stats */
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
- $graphcmd .= "--start $start --end $end ";
+ $graphcmd .= "--start $start --end $end --step $step ";
$graphcmd .= "--vertical-label \"Captive Portal Users\" ";
$graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
$graphcmd .= "--base=1000 ";
@@ -1058,7 +1068,7 @@ elseif((strstr($curdatabase, "-loggedin.rrd")) && (file_exists("$rrddbpath$curda
$graphcmd .= "--slope-mode ";
$graphcmd .= "--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" ";
$graphcmd .= "--height 200 --width 620 ";
- $graphcmd .= "DEF:\"$curif-loggedinusers=$rrddbpath$curdatabase:loggedinusers:AVERAGE\" ";
+ $graphcmd .= "DEF:\"$curif-loggedinusers=$rrddbpath$curdatabase:loggedinusers:AVERAGE:step=$step\" ";
$graphcmd .= "CDEF:\"$curif-totalusers_t=PREV,UN,0,PREV,IF,$curif-loggedinusers,+\" ";
$graphcmd .= "CDEF:\"$curif-totalusers_d=$curif-totalusers_t,FLOOR\" ";
$graphcmd .= "AREA:\"$curif-totalusers_d#{$colorcaptiveportalusers[0]}:Total logged in users\" ";
@@ -1069,7 +1079,7 @@ elseif((strstr($curdatabase, "-loggedin.rrd")) && (file_exists("$rrddbpath$curda
elseif((strstr($curdatabase, "-concurrent.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
/* define graphcmd for online Captive Portal users stats */
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
- $graphcmd .= "--start $start --end $end ";
+ $graphcmd .= "--start $start --end $end --step $step ";
$graphcmd .= "--vertical-label \"Captive Portal Users\" ";
$graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
$graphcmd .= "--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" ";
@@ -1077,7 +1087,7 @@ elseif((strstr($curdatabase, "-concurrent.rrd")) && (file_exists("$rrddbpath$cur
$graphcmd .= "--lower-limit=0 ";
$graphcmd .= "--slope-mode ";
$graphcmd .= "--height 200 --width 620 ";
- $graphcmd .= "DEF:\"$curif-concurrentusers=$rrddbpath$curdatabase:concurrentusers:AVERAGE\" ";
+ $graphcmd .= "DEF:\"$curif-concurrentusers=$rrddbpath$curdatabase:concurrentusers:AVERAGE:step=$step\" ";
$graphcmd .= "AREA:\"$curif-concurrentusers#{$colorcaptiveportalusers[0]}:Concurrent Users\" ";
$graphcmd .= "COMMENT:\"\\n\" ";
$graphcmd .= "COMMENT:\"\t\t\t current\t\t average\t maximum\\n\" ";
diff --git a/usr/local/www/system_advanced_firewall.php b/usr/local/www/system_advanced_firewall.php
index f4ea44a..dc143ce 100644
--- a/usr/local/www/system_advanced_firewall.php
+++ b/usr/local/www/system_advanced_firewall.php
@@ -59,6 +59,7 @@ $pconfig['adaptiveend'] = $config['system']['adaptiveend'];
$pconfig['maximumstates'] = $config['system']['maximumstates'];
$pconfig['aliasesresolveinterval'] = $config['system']['aliasesresolveinterval'];
$old_aliasesresolveinterval = $config['system']['aliasesresolveinterval'];
+$pconfig['checkaliasesurlcert'] = isset($config['system']['checkaliasesurlcert']);
$pconfig['maximumtables'] = $config['system']['maximumtables'];
$pconfig['maximumtableentries'] = $config['system']['maximumtableentries'];
$pconfig['disablereplyto'] = isset($config['system']['disablereplyto']);
@@ -75,7 +76,7 @@ $pconfig['disablevpnrules'] = isset($config['system']['disablevpnrules']);
if ($_POST) {
unset($input_errors);
- $pconfig = array_merge($pconfig, $_POST);
+ $pconfig = $_POST;
/* input validation */
if ((empty($_POST['adaptivestart']) && !empty($_POST['adaptiveend'])) || (!empty($_POST['adaptivestart']) && empty($_POST['adaptiveend'])))
@@ -105,8 +106,8 @@ if ($_POST) {
$input_errors[] = gettext("The Reflection timeout must be an integer.");
}
- ob_flush();
- flush();
+ ob_flush();
+ flush();
if (!$input_errors) {
@@ -130,18 +131,23 @@ if ($_POST) {
unset($config['system']['scrubnodf']);
if($_POST['scrubrnid'] == "yes")
- $config['system']['scrubrnid'] = "enabled";
- else
- unset($config['system']['scrubrnid']);
+ $config['system']['scrubrnid'] = "enabled";
+ else
+ unset($config['system']['scrubrnid']);
if (!empty($_POST['adaptiveend']))
$config['system']['adaptiveend'] = $_POST['adaptiveend'];
- else
- unset($config['system']['adaptiveend']);
+ else
+ unset($config['system']['adaptiveend']);
if (!empty($_POST['adaptivestart']))
$config['system']['adaptivestart'] = $_POST['adaptivestart'];
- else
- unset($config['system']['adaptivestart']);
+ else
+ unset($config['system']['adaptivestart']);
+
+ if ($_POST['checkaliasesurlcert'] == "yes")
+ $config['system']['checkaliasesurlcert'] = true;
+ else
+ unset($config['system']['checkaliasesurlcert']);
$config['system']['optimization'] = $_POST['optimization'];
$config['system']['maximumstates'] = $_POST['maximumstates'];
@@ -166,14 +172,14 @@ if ($_POST) {
unset($config['system']['enablebinatreflection']);
if($_POST['disablereplyto'] == "yes")
- $config['system']['disablereplyto'] = $_POST['disablereplyto'];
- else
- unset($config['system']['disablereplyto']);
+ $config['system']['disablereplyto'] = $_POST['disablereplyto'];
+ else
+ unset($config['system']['disablereplyto']);
if($_POST['disablenegate'] == "yes")
- $config['system']['disablenegate'] = $_POST['disablenegate'];
- else
- unset($config['system']['disablenegate']);
+ $config['system']['disablenegate'] = $_POST['disablenegate'];
+ else
+ unset($config['system']['disablenegate']);
if($_POST['enablenatreflectionhelper'] == "yes")
$config['system']['enablenatreflectionhelper'] = "yes";
@@ -196,7 +202,7 @@ if ($_POST) {
$config['system']['tftpinterface'] = implode(",", $_POST['tftpinterface']);
else
unset($config['system']['tftpinterface']);
-
+
if ($_POST['bogonsinterval'] != $config['system']['bogons']['interval']) {
switch ($_POST['bogonsinterval']) {
case 'daily':
@@ -212,7 +218,7 @@ if ($_POST) {
}
$config['system']['bogons']['interval'] = $_POST['bogonsinterval'];
}
-
+
write_config();
// Kill filterdns when value changes, filter_configure() will restart it
@@ -223,9 +229,9 @@ if ($_POST) {
$retval = 0;
$retval = filter_configure();
if(stristr($retval, "error") <> true)
- $savemsg = get_std_save_message($retval);
+ $savemsg = get_std_save_message($retval);
else
- $savemsg = $retval;
+ $savemsg = $retval;
}
}
@@ -247,7 +253,7 @@ descs[2]="<?=gettext("expires idle connections quicker. More efficient use of CP
descs[3]="<?=gettext("tries to avoid dropping any legitimate idle connections at the expense of increased memory usage and CPU utilization.");?>";
function update_description(itemnum) {
- document.forms[0].info.value=descs[itemnum];
+ document.forms[0].info.value=descs[itemnum];
}
@@ -360,7 +366,7 @@ function update_description(itemnum) {
<br/>
<input name="adaptivestart" type="text" id="adaptivestart" value="<?php echo $pconfig['adaptivestart']; ?>" />
<br/><?=gettext("When the number of state entries exceeds this value, adaptive scaling begins. All timeout values are scaled linearly with factor (adaptive.end - number of states) / (adaptive.end - adaptive.start).");?>
-
+
<br/>
<input name="adaptiveend" type="text" id="adaptiveend" value="<?php echo $pconfig['adaptiveend']; ?>" />
<br/><?=gettext("When reaching this number of state entries, all timeout values become zero, effectively purging all state entries immediately. This value is used to define the scale factor, it should not actually be reached (set a lower state limit, see below).");?>
@@ -416,7 +422,7 @@ function update_description(itemnum) {
<strong><?=gettext("Bypass firewall rules for traffic on the same interface");?></strong>
<br/>
<?=gettext("This option only applies if you have defined one or more static routes. If it is enabled, traffic that enters and " .
- "leaves through the same interface will not be checked by the firewall. This may be desirable in some situations where " .
+ "leaves through the same interface will not be checked by the firewall. This may be desirable in some situations where " .
"multiple subnets are connected to the same interface.");?>
<br/>
</td>
@@ -427,7 +433,7 @@ function update_description(itemnum) {
<input name="disablevpnrules" type="checkbox" id="disablevpnrules" value="yes" <?php if (isset($config['system']['disablevpnrules'])) echo "checked=\"checked\""; ?> />
<strong><?=gettext("Disable all auto-added VPN rules.");?></strong>
<br />
- <span class="vexpl"><?=gettext("Note: This disables automatically added rules for IPsec, PPTP.");?>
+ <span class="vexpl"><?=gettext("Note: This disables automatically added rules for IPsec, PPTP.");?>
</span>
</td>
</tr>
@@ -443,7 +449,7 @@ function update_description(itemnum) {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Disable Negate rules</td>
+ <td width="22%" valign="top" class="vncell">Disable Negate rules</td>
<td width="78%" class="vtable">
<input name="disablenegate" type="checkbox" id="disablenegate" value="yes" <?php if ($pconfig['disablenegate']) echo "checked=\"checked\""; ?> />
<strong><?=gettext("Disable Negate rule on policy routing rules");?></strong>
@@ -463,11 +469,21 @@ function update_description(itemnum) {
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Check certificate of aliases URLs");?></td>
+ <td width="78%" class="vtable">
+ <input name="checkaliasesurlcert" type="checkbox" id="checkaliasesurlcert" value="yes" <?php if ($pconfig['checkaliasesurlcert']) echo "checked=\"checked\""; ?> />
+ <strong><?=gettext("Verify HTTPS certificates when downloading alias URLs");?></strong>
+ <br />
+ <?=gettext("Make sure the certificate is valid for all HTTPS addresses on aliases. If it's not valid or is revoked, do not download it.");?>
+ <br />
+ </td>
+ </tr>
+ <tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Bogon Networks");?></td>
- </tr>
+ </tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Update Frequency");?></td>
<td width="78%" class="vtable">
@@ -486,7 +502,7 @@ function update_description(itemnum) {
<?php if(count($config['interfaces']) > 1): ?>
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Network Address Translation");?></td>
- </tr>
+ </tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("NAT Reflection mode for port forwards");?></td>
<td width="78%" class="vtable">
diff --git a/usr/local/www/system_advanced_network.php b/usr/local/www/system_advanced_network.php
index 6e7f99c..7c42ce6 100644
--- a/usr/local/www/system_advanced_network.php
+++ b/usr/local/www/system_advanced_network.php
@@ -56,19 +56,18 @@ $pconfig['sharednet'] = $config['system']['sharednet'];
$pconfig['disablechecksumoffloading'] = isset($config['system']['disablechecksumoffloading']);
$pconfig['disablesegmentationoffloading'] = isset($config['system']['disablesegmentationoffloading']);
$pconfig['disablelargereceiveoffloading'] = isset($config['system']['disablelargereceiveoffloading']);
-$pconfig['flowtable'] = false;
$pconfig['flowtable'] = isset($config['system']['flowtable']);
if ($_POST) {
- unset($input_errors);
- $pconfig = $_POST;
+ unset($input_errors);
+ $pconfig = $_POST;
if ($_POST['ipv6nat_enable'] && !is_ipaddr($_POST['ipv6nat_ipaddr']))
$input_errors[] = gettext("You must specify an IP address to NAT IPv6 packets.");
- ob_flush();
- flush();
+ ob_flush();
+ flush();
if (!$input_errors) {
if($_POST['ipv6nat_enable'] == "yes") {
@@ -78,15 +77,15 @@ if ($_POST) {
if($config['diag']) {
if($config['diag']['ipv6nat']) {
unset($config['diag']['ipv6nat']['enable']);
- unset($config['diag']['ipv6nat']['ipaddr']);
+ unset($config['diag']['ipv6nat']['ipaddr']);
}
}
}
-
+
if($_POST['ipv6allow'] == "yes") {
- $config['system']['ipv6allow'] = true;
+ $config['system']['ipv6allow'] = true;
} else {
- unset($config['system']['ipv6allow']);
+ unset($config['system']['ipv6allow']);
}
if($_POST['sharednet'] == "yes") {
@@ -139,9 +138,9 @@ if ($_POST) {
$retval = filter_configure();
if(stristr($retval, "error") <> true)
- $savemsg = get_std_save_message(gettext($retval));
+ $savemsg = get_std_save_message(gettext($retval));
else
- $savemsg = gettext($retval);
+ $savemsg = gettext($retval);
}
}
@@ -184,7 +183,7 @@ function enable_change(enable_over) {
$tab_array[] = array(gettext("Networking"), true, "system_advanced_network.php");
$tab_array[] = array(gettext("Miscellaneous"), false, "system_advanced_misc.php");
$tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.php");
- $tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
+ $tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
display_top_tabs($tab_array);
?>
</td>
@@ -193,7 +192,7 @@ function enable_change(enable_over) {
<td id="mainarea">
<div class="tabcont">
<span class="vexpl">
- <span class="red">
+ <span class="red">
<strong><?=gettext("NOTE:"); ?>&nbsp;</strong>
</span>
<?=gettext("The options on this page are intended for use by advanced users only."); ?>
@@ -274,7 +273,7 @@ function enable_change(enable_over) {
<?=gettext("This option will suppress ARP log messages when multiple interfaces reside on the same broadcast domain"); ?>
</td>
</tr>
-<?php
+<?php
/*
$version = get_freebsd_version();
if($version == "8"):
@@ -290,8 +289,8 @@ function enable_change(enable_over) {
<td width="78%" class="vtable">
<input name="flowtable" type="checkbox" id="polling_enable" value="yes" <?php if ($pconfig['flowtable']) echo "checked=\"checked\""; ?> />
<strong>Enable flowtable support</strong><br />
- Enables infrastructure for caching flows as a means of accelerating L3 and L2 lookups
- as well as providing stateful load balancing when used with RADIX_MPATH.<br/>
+ Enables infrastructure for caching flows as a means of accelerating L3 and L2 lookups
+ as well as providing stateful load balancing when used with RADIX_MPATH.<br/>
</td>
</tr>
<?php endif; ?>
@@ -299,7 +298,7 @@ function enable_change(enable_over) {
?>
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
- </tr>
+ </tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%"><input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /></td>
diff --git a/usr/local/www/system_usermanager_addprivs.php b/usr/local/www/system_usermanager_addprivs.php
index 5946db8..c7e1d3a 100644
--- a/usr/local/www/system_usermanager_addprivs.php
+++ b/usr/local/www/system_usermanager_addprivs.php
@@ -136,7 +136,7 @@ if (is_array($priv_list)) {
foreach($priv_list as $pname => $pdata) {
if (in_array($pname, $a_user['priv']))
continue;
- $desc = addslashes($pdata['descr']);
+ $desc = addslashes(preg_replace("/pfSense/i", $g['product_name'], $pdata['descr']));
$jdescs .= "descs[{$id}] = '{$desc}';\n";
$id++;
}
diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php
index abbd826..e3db6c4 100644
--- a/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/usr/local/www/widgets/widgets/system_information.widget.php
@@ -47,7 +47,11 @@ if($_REQUEST['getupdatestatus']) {
$nanosize = "";
if ($g['platform'] == "nanobsd") {
- $nanosize = "-nanobsd-" . strtolower(trim(file_get_contents("/etc/nanosize.txt")));
+ if (file_exists("/etc/nano_use_vga.txt"))
+ $nanosize = "-nanobsd-vga-";
+ else
+ $nanosize = "-nanobsd-";
+ $nanosize .= strtolower(trim(file_get_contents("/etc/nanosize.txt")));
}
@unlink("/tmp/{$g['product_name']}_version");
OpenPOWER on IntegriCloud