summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato.botelho@bluepex.com>2010-07-12 09:40:09 -0300
committerRenato Botelho <renato.botelho@bluepex.com>2010-07-12 09:40:09 -0300
commit657ba532ddfbec6b78969f766fff06295b85dad9 (patch)
tree80e87a331e35d04fe2288681e1a8a59665bfb1ae
parent482b642a4c927f695ad23898d487a73105ccc056 (diff)
parent68cbabcbfd0f09814e4077e91f20fcf7b447b6a2 (diff)
downloadpfsense-657ba532ddfbec6b78969f766fff06295b85dad9.zip
pfsense-657ba532ddfbec6b78969f766fff06295b85dad9.tar.gz
Merge remote branch 'mainline/master' into 1_diag
Conflicts: usr/local/www/diag_ipsec_sad.php
-rw-r--r--etc/inc/auth.inc18
-rw-r--r--etc/inc/authgui.inc20
-rw-r--r--etc/inc/priv.defs.inc4
-rw-r--r--etc/inc/system.inc5
-rw-r--r--etc/inc/vslb.inc35
-rw-r--r--etc/inc/xmlparse.inc41
-rw-r--r--etc/inc/xmlparse_attr.inc227
-rw-r--r--etc/phpshellsessions/gitsync36
-rw-r--r--usr/local/www/classes/maintable.inc2
-rwxr-xr-xusr/local/www/diag_ipsec_sad.php2
-rwxr-xr-xusr/local/www/fbegin.inc2
-rwxr-xr-xusr/local/www/firewall_nat_out.php63
-rwxr-xr-xusr/local/www/firewall_rules.php87
-rwxr-xr-xusr/local/www/firewall_rules_edit.php8
-rwxr-xr-xusr/local/www/guiconfig.inc14
-rw-r--r--usr/local/www/help.php4
-rwxr-xr-xusr/local/www/interfaces.php1
-rwxr-xr-xusr/local/www/load_balancer_monitor.php4
-rwxr-xr-xusr/local/www/load_balancer_monitor_edit.php4
-rwxr-xr-xusr/local/www/load_balancer_pool.php4
-rwxr-xr-xusr/local/www/load_balancer_pool_edit.php4
-rwxr-xr-xusr/local/www/load_balancer_relay_action.php4
-rwxr-xr-xusr/local/www/load_balancer_relay_action_edit.php4
-rwxr-xr-xusr/local/www/load_balancer_relay_protocol.php4
-rwxr-xr-xusr/local/www/load_balancer_relay_protocol_edit.php4
-rwxr-xr-xusr/local/www/load_balancer_virtual_server.php4
-rwxr-xr-xusr/local/www/load_balancer_virtual_server_edit.php5
-rwxr-xr-xusr/local/www/status_lb_pool.php (renamed from usr/local/www/status_slbd_pool.php)12
-rwxr-xr-xusr/local/www/status_lb_vs.php (renamed from usr/local/www/status_slbd_vs.php)8
-rw-r--r--usr/local/www/vpn_openvpn_server.php4
-rwxr-xr-xusr/local/www/wizard.php3
31 files changed, 468 insertions, 169 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index d0b261a..504b241 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -60,8 +60,8 @@ if (function_exists("display_error_form") && !isset($config['system']['webgui'][
} else {
$http_host = $_SERVER['HTTP_HOST'];
}
- if(($http_host == "localhost" or $_SERVER['SERVER_ADDR'] == "localhost") or
- ($http_host == "127.0.0.1" or $_SERVER['SERVER_ADDR'] == "127.0.0.1"))
+ if(is_ipaddr($http_host) or $_SERVER['SERVER_ADDR'] == "127.0.0.1" or
+ $http_host == "localhost" or $_SERVER['SERVER_ADDR'] == "localhost")
$found_host = true;
if($config['dyndnses']['dyndns'])
foreach($config['dyndnses']['dyndns'] as $dyndns)
@@ -80,20 +80,6 @@ if (function_exists("display_error_form") && !isset($config['system']['webgui'][
$http_host == $config['system']['hostname'])
$found_host = true;
- /* Check against locally configured IP addresses, which will catch when someone
- port forwards WebGUI access from WAN to an internal IP on the router. */
- if ($found_host == false) {
- global $FilterIflist;
- if (empty($FilterIflist)) {
- require_once('filter.inc');
- require_once('shaper.inc');
- filter_generate_optcfg_array();
- }
- foreach ($FilterIflist as $iflist)
- if($iflist['ip'] == $http_host)
- $found_host = true;
- }
-
if($found_host == false) {
display_error_form("501", "Potential DNS Rebind attack detected, see http://en.wikipedia.org/wiki/DNS_rebinding");
exit;
diff --git a/etc/inc/authgui.inc b/etc/inc/authgui.inc
index b3cd6a6..0747452 100644
--- a/etc/inc/authgui.inc
+++ b/etc/inc/authgui.inc
@@ -163,6 +163,24 @@ function display_login_form() {
exit;
}
+/* Check against locally configured IP addresses, which will catch when someone
+ port forwards WebGUI access from WAN to an internal IP on the router. */
+global $FilterIflist;
+$local_ip = false;
+if(strstr($_SERVER['HTTP_HOST'], ":")) {
+ $http_host_port = explode(":", $_SERVER['HTTP_HOST']);
+ $http_host = $http_host_port[0];
+} else {
+ $http_host = $_SERVER['HTTP_HOST'];
+}
+if (empty($FilterIflist)) {
+ require_once('filter.inc');
+ require_once('shaper.inc');
+ filter_generate_optcfg_array();
+}
+foreach ($FilterIflist as $iflist)
+ if($iflist['ip'] == $http_host)
+ $local_ip = true;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
@@ -198,6 +216,8 @@ function display_login_form() {
</head>
<body onload="page_load()">
<div id="login">
+ <?php if(is_ipaddr($http_host) && !$local_ip)
+ print_info_box(gettext("You are accessing this router by an IP address not configured locally, which may be forwarded by NAT or other means. <br/><br/>If you did not setup this forwarding, you may be the target of a man-in-the-middle attack.")); ?>
<form id="iform" name="login_iform" method="post" autocomplete="off" action="<?=$_SERVER['SCRIPT_NAME'];?>">
<h1></h1>
<div id="inputerrors"><?=$_SESSION['Login_Error'];?></div>
diff --git a/etc/inc/priv.defs.inc b/etc/inc/priv.defs.inc
index f8bb5ea..3139972 100644
--- a/etc/inc/priv.defs.inc
+++ b/etc/inc/priv.defs.inc
@@ -790,13 +790,13 @@ $priv_list['page-status-loadbalancer-pool'] = array();
$priv_list['page-status-loadbalancer-pool']['name'] = "WebCfg - Status: Load Balancer: Pool page";
$priv_list['page-status-loadbalancer-pool']['descr'] = "Allow access to the 'Status: Load Balancer: Pool' page.";
$priv_list['page-status-loadbalancer-pool']['match'] = array();
-$priv_list['page-status-loadbalancer-pool']['match'][] = "status_slbd_pool.php*";
+$priv_list['page-status-loadbalancer-pool']['match'][] = "status_lb_pool.php*";
$priv_list['page-status-loadbalancer-virtualserver'] = array();
$priv_list['page-status-loadbalancer-virtualserver']['name'] = "WebCfg - Status: Load Balancer: Virtual Server page";
$priv_list['page-status-loadbalancer-virtualserver']['descr'] = "Allow access to the 'Status: Load Balancer: Virtual Server' page.";
$priv_list['page-status-loadbalancer-virtualserver']['match'] = array();
-$priv_list['page-status-loadbalancer-virtualserver']['match'][] = "status_slbd_vs.php*";
+$priv_list['page-status-loadbalancer-virtualserver']['match'][] = "status_lb_vs.php*";
$priv_list['page-status-upnpstatus'] = array();
$priv_list['page-status-upnpstatus']['name'] = "WebCfg - Status: UPnP Status page";
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index a79a5fb..618a50d 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -483,6 +483,8 @@ function system_syslogd_start() {
if($syslogcfg['remoteserver3'])
$syslogconf .= "*.* @{$syslogcfg['remoteserver3']}\n";
}
+ $syslogconf .= "!relayd\n";
+ $syslogconf .= "*.* {$log_directive}{$g['varlog_path']}/relayd.log\n";
$syslogconf .= "!-{$facilitylist}\n";
if (!isset($syslogcfg['disablelocallogging']))
$syslogconf .= <<<EOD
@@ -495,7 +497,6 @@ news.err;local0.none;local3.none;local4.none; {$log_directive}{$g['varlog_path
local7.none {$log_directive}{$g['varlog_path']}/system.log
security.* {$log_directive}{$g['varlog_path']}/system.log
auth.info;authpriv.info;daemon.info {$log_directive}{$g['varlog_path']}/system.log
-local1.* {$log_directive}{$g['varlog_path']}/relayd.log
auth.info;authpriv.info |exec /usr/local/sbin/sshlockout_pf
*.emerg *
@@ -1450,4 +1451,4 @@ function system_get_dmesg_boot() {
return file_get_contents("{$g['varlog_path']}/dmesg.boot");
}
-?>
+?> \ No newline at end of file
diff --git a/etc/inc/vslb.inc b/etc/inc/vslb.inc
index ef35c2b..dcf30cf 100644
--- a/etc/inc/vslb.inc
+++ b/etc/inc/vslb.inc
@@ -201,6 +201,7 @@ function relayd_configure() {
/* reindex pools by name as we loop through the pools array */
$pools = array();
+ $conf .= "log updates \n";
/* Virtual server pools */
if(is_array($pool_a)) {
for ($i = 0; isset($pool_a[$i]); $i++) {
@@ -230,7 +231,7 @@ function relayd_configure() {
if(is_array($vs_a)) {
for ($i = 0; isset($vs_a[$i]); $i++) {
switch($vs_a[$i]['mode']) {
- case 'redirect': {
+ case 'redirect_mode': {
$conf .= "redirect \"{$vs_a[$i]['name']}\" {\n";
$conf .= " listen on {$vs_a[$i]['ipaddr']} port {$vs_a[$i]['port']}\n";
$conf .= " forward to <{$vs_a[$i]['pool']}> port {$pools[$vs_a[$i]['pool']]['port']} {$check_a[$pools[$vs_a[$i]['pool']]['monitor']]} timeout 1000\n";
@@ -259,17 +260,27 @@ function relayd_configure() {
fwrite($fd, $conf);
fclose($fd);
- if (is_process_running('relayd: parent')) {
- /*
- * XXX: Something breaks our control connection with relayd and makes relayctl stop working
- * rule reloads are the current suspect
- * mwexec('/usr/local/bin/relayctl stop');
- */
- mwexec('pkill relayd');
- }
- if (! empty($vs_a)) {
- mwexec("/usr/local/sbin/relayd -f {$g['varetc_path']}/relayd.conf");
+ if (is_process_running('relayd')) {
+ if (! empty($vs_a)) {
+ // it's running and there is a config, just reload
+ mwexec("/usr/local/bin/relayctl reload");
+ } else {
+ /*
+ * XXX: Something breaks our control connection with relayd
+ * and makes 'relayctl stop' not work
+ * rule reloads are the current suspect
+ * mwexec('/usr/local/bin/relayctl stop');
+ * returns "command failed"
+ */
+ mwexec('pkill relayd');
+ }
+ } else {
+ if (! empty($vs_a)) {
+ // not running and there is a config, start it
+ mwexec("/usr/local/sbin/relayd -f {$g['varetc_path']}/relayd.conf");
+ }
}
+
}
-?>
+?> \ No newline at end of file
diff --git a/etc/inc/xmlparse.inc b/etc/inc/xmlparse.inc
index 59b0eb4..7a9d7b8 100644
--- a/etc/inc/xmlparse.inc
+++ b/etc/inc/xmlparse.inc
@@ -59,28 +59,14 @@ function listtags_pkg() {
return $ret;
}
-/* The following items will be treated as arrays in regdomain.xml */
-function listtags_rd() {
- $ret = explode(" ",
- "band country flags freqband netband rd "
- );
- return $ret;
-}
-
function startElement($parser, $name, $attrs) {
- global $parsedcfg, $depth, $curpath, $havedata, $listtags, $parsedattrs, $parsingattrs;
+ global $parsedcfg, $depth, $curpath, $havedata, $listtags;
array_push($curpath, strtolower($name));
$ptr =& $parsedcfg;
- if (isset($parsingattrs) && !empty($attrs)) {
- $attrptr =& $parsedattrs;
- $writeattrs = true;
- }
foreach ($curpath as $path) {
$ptr =& $ptr[$path];
- if (isset($writeattrs))
- $attrptr =& $attrptr[$path];
}
/* is it an element that belongs to a list? */
@@ -94,19 +80,11 @@ function startElement($parser, $name, $attrs) {
array_push($curpath, count($ptr));
- if (isset($writeattrs)) {
- if (!is_array($attrptr))
- $attrptr = array();
- $attrptr[count($ptr)] = $attrs;
- }
-
} else if (isset($ptr)) {
/* multiple entries not allowed for this element, bail out */
die(sprintf("XML error: %s at line %d cannot occur more than once\n",
$name,
xml_get_current_line_number($parser)));
- } else if (isset($writeattrs)) {
- $attrptr = $attrs;
}
$depth++;
@@ -180,23 +158,6 @@ function parse_xml_config_pkg($cffile, $rootobj, $isstring = "false") {
return $cfg;
}
-function parse_xml_regdomain(&$rdattributes, $rdfile = '/etc/regdomain.xml', $rootobj = 'regulatory-data') {
- global $listtags, $parsedattrs, $parsingattrs;
- $listtags = listtags_rd();
- if (isset($rdattributes)) {
- $parsedattrs = array();
- $parsingattrs = true;
- $ret = parse_xml_config_raw($rdfile, $rootobj);
- if ($parsedattrs[$rootobj])
- $rdattributes = $parsedattrs[$rootobj];
- unset($parsedattrs);
- unset($parsingattrs);
- return $ret;
- } else {
- return parse_xml_config_raw($rdfile, $rootobj);
- }
-}
-
function parse_xml_config_raw($cffile, $rootobj, $isstring = "false") {
global $depth, $curpath, $parsedcfg, $havedata, $listtags;
diff --git a/etc/inc/xmlparse_attr.inc b/etc/inc/xmlparse_attr.inc
new file mode 100644
index 0000000..06d02c4
--- /dev/null
+++ b/etc/inc/xmlparse_attr.inc
@@ -0,0 +1,227 @@
+<?php
+/* $Id$ */
+/*
+ xmlparse_attr.inc
+ functions to parse configuration files in XML format with attributes
+ Copyright (C) 2010 Erik Fonnesbeck
+ All rights reserved.
+
+ Based on xmlparse.inc, originally part of m0n0wall (http://m0n0.ch/wall)
+ Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* The following items will be treated as arrays in regdomain.xml */
+function listtags_rd() {
+ $ret = explode(" ",
+ "band country flags freqband netband rd"
+ );
+ return $ret;
+}
+
+function startElement_attr($parser, $name, $attrs) {
+ global $parsedcfg, $depth, $curpath, $havedata, $listtags, $parsedattrs;
+
+ array_push($curpath, strtolower($name));
+
+ $ptr =& $parsedcfg;
+ if (!empty($attrs)) {
+ $attrptr =& $parsedattrs;
+ $writeattrs = true;
+ }
+ foreach ($curpath as $path) {
+ $ptr =& $ptr[$path];
+ if (isset($writeattrs))
+ $attrptr =& $attrptr[$path];
+ }
+
+ /* is it an element that belongs to a list? */
+ if (in_array(strtolower($name), $listtags)) {
+
+ /* is there an array already? */
+ if (!is_array($ptr)) {
+ /* make an array */
+ $ptr = array();
+ }
+
+ array_push($curpath, count($ptr));
+
+ if (isset($writeattrs)) {
+ if (!is_array($attrptr))
+ $attrptr = array();
+ $attrptr[count($ptr)] = $attrs;
+ }
+
+ } else if (isset($ptr)) {
+ /* multiple entries not allowed for this element, bail out */
+ die(sprintf("XML error: %s at line %d cannot occur more than once\n",
+ $name,
+ xml_get_current_line_number($parser)));
+ } else if (isset($writeattrs)) {
+ $attrptr = $attrs;
+ }
+
+ $depth++;
+ $havedata = $depth;
+}
+
+function endElement_attr($parser, $name) {
+ global $depth, $curpath, $parsedcfg, $havedata, $listtags;
+
+ if ($havedata == $depth) {
+ $ptr =& $parsedcfg;
+ foreach ($curpath as $path) {
+ $ptr =& $ptr[$path];
+ }
+ $ptr = "";
+ }
+
+ array_pop($curpath);
+
+ if (in_array(strtolower($name), $listtags))
+ array_pop($curpath);
+
+ $depth--;
+}
+
+function cData_attr($parser, $data) {
+ global $depth, $curpath, $parsedcfg, $havedata;
+
+ $data = trim($data, "\t\n\r");
+
+ if ($data != "") {
+ $ptr =& $parsedcfg;
+ foreach ($curpath as $path) {
+ $ptr =& $ptr[$path];
+ }
+
+ if (is_string($ptr)) {
+ $ptr .= html_entity_decode($data);
+ } else {
+ if (trim($data, " ") != "") {
+ $ptr = html_entity_decode($data);
+ $havedata++;
+ }
+ }
+ }
+}
+
+function parse_xml_regdomain(&$rdattributes, $rdfile = '', $rootobj = 'regulatory-data') {
+ global $g, $listtags;
+
+ if (empty($rdfile))
+ $rdfile = $g['etc_path'] . '/regdomain.xml';
+ $listtags = listtags_rd();
+ $parsed_xml = array();
+
+ if (file_exists($g['tmp_path'] . '/regdomain.cache')) {
+ $parsed_xml = unserialize(file_get_contents($g['tmp_path'] . '/regdomain.cache'));
+ if (!empty($parsed_xml)) {
+ $rdmain = $parsed_xml['main'];
+ $rdattributes = $parsed_xml['attributes'];
+ }
+ }
+ if (empty($parsed_xml) && file_exists($g['etc_path'] . '/regdomain.xml')) {
+ $rdmain = parse_xml_config_raw_attr($rdfile, $rootobj, $rdattributes);
+
+ // unset parts that aren't used before making cache
+ foreach ($rdmain['regulatory-domains']['rd'] as $rdkey => $rdentry) {
+ if (isset($rdmain['regulatory-domains']['rd'][$rdkey]['netband']))
+ unset($rdmain['regulatory-domains']['rd'][$rdkey]['netband']);
+ if (isset($rdattributes['regulatory-domains']['rd'][$rdkey]['netband']))
+ unset($rdattributes['regulatory-domains']['rd'][$rdkey]['netband']);
+ }
+ if (isset($rdmain['shared-frequency-bands']))
+ unset($rdmain['shared-frequency-bands']);
+ if (isset($rdattributes['shared-frequency-bands']))
+ unset($rdattributes['shared-frequency-bands']);
+
+ $parsed_xml = array('main' => $rdmain, 'attributes' => $rdattributes);
+ $rdcache = fopen($g['tmp_path'] . '/regdomain.cache', "w");
+ fwrite($rdcache, serialize($parsed_xml));
+ fclose($rdcache);
+ }
+
+ return $rdmain;
+}
+
+function parse_xml_config_raw_attr($cffile, $rootobj, &$parsed_attributes, $isstring = "false") {
+
+ global $depth, $curpath, $parsedcfg, $havedata, $listtags, $parsedattrs;
+ $parsedcfg = array();
+ $curpath = array();
+ $depth = 0;
+ $havedata = 0;
+
+ if (isset($parsed_attributes))
+ $parsedattrs = array();
+
+ $xml_parser = xml_parser_create();
+
+ xml_set_element_handler($xml_parser, "startElement_attr", "endElement_attr");
+ xml_set_character_data_handler($xml_parser, "cData_attr");
+ xml_parser_set_option($xml_parser,XML_OPTION_SKIP_WHITE, 1);
+
+ if (!($fp = fopen($cffile, "r"))) {
+ log_error("Error: could not open XML input\n");
+ if (isset($parsed_attributes)) {
+ $parsed_attributes = array();
+ unset($parsedattrs);
+ }
+ return -1;
+ }
+
+ while ($data = fread($fp, 4096)) {
+ if (!xml_parse($xml_parser, $data, feof($fp))) {
+ log_error(sprintf("XML error: %s at line %d\n",
+ xml_error_string(xml_get_error_code($xml_parser)),
+ xml_get_current_line_number($xml_parser)));
+ if (isset($parsed_attributes)) {
+ $parsed_attributes = array();
+ unset($parsedattrs);
+ }
+ return -1;
+ }
+ }
+ xml_parser_free($xml_parser);
+
+ if (!$parsedcfg[$rootobj]) {
+ log_error("XML error: no $rootobj object found!\n");
+ if (isset($parsed_attributes)) {
+ $parsed_attributes = array();
+ unset($parsedattrs);
+ }
+ return -1;
+ }
+
+ if (isset($parsed_attributes)) {
+ if ($parsedattrs[$rootobj])
+ $parsed_attributes = $parsedattrs[$rootobj];
+ unset($parsedattrs);
+ }
+
+ return $parsedcfg[$rootobj];
+}
+
+?>
diff --git a/etc/phpshellsessions/gitsync b/etc/phpshellsessions/gitsync
index cff0b04..1d95bc3 100644
--- a/etc/phpshellsessions/gitsync
+++ b/etc/phpshellsessions/gitsync
@@ -147,25 +147,27 @@ if($nobackup == false) {
echo "===> Checking out $branch\n";
exec("mkdir -p /root/pfsense/$branch");
+// Git commands for resetting to the specified branch
+if($branch == "build_commit") {
+ $git_cmd = array(
+ "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git branch $branch 2>/dev/null",
+ "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git checkout -f $branch 2>/dev/null",
+ "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git reset --hard `cat /etc/version.lastcommit`"
+ );
+} else {
+ $git_cmd = array(
+ "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git branch $branch origin/$branch 2>/dev/null",
+ "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git checkout -f $branch 2>/dev/null",
+ "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git reset --hard origin/$branch"
+ );
+}
+
// Git 'er done!
if(is_dir("$CODIR/pfSenseGITREPO/pfSenseGITREPO")) {
echo "===> Fetching updates...\n";
exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git config remote.origin.url $GIT_REPO");
exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git fetch");
exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git clean -f -f -x -d");
- if($branch == "build_commit") {
- $git_cmd = array(
- "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git branch $branch 2>/dev/null",
- "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git checkout -f $branch 2>/dev/null",
- "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git reset --hard `cat /etc/version.lastcommit`"
- );
- } else {
- $git_cmd = array(
- "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git branch $branch origin/$branch 2>/dev/null",
- "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git checkout -f $branch 2>/dev/null",
- "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git reset --hard origin/$branch"
- );
- }
run_cmds($git_cmd);
} else {
exec("mkdir -p $CODIR/pfSenseGITREPO");
@@ -175,13 +177,7 @@ if(is_dir("$CODIR/pfSenseGITREPO/pfSenseGITREPO")) {
exec("mv $CODIR/pfSenseGITREPO/pfSense $CODIR/pfSenseGITREPO/pfSenseGITREPO");
if(is_dir("$CODIR/pfSenseGITREPO/mainline"))
exec("mv $CODIR/pfSenseGITREPO/mainline $CODIR/pfSenseGITREPO/pfSenseGITREPO");
- if($branch == "master") {
- exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git checkout master");
- } else if($branch == "build_commit") {
- exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git checkout -b build_commit `cat /etc/version.lastcommit`");
- } else {
- exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git checkout -b $branch origin/$branch");
- }
+ run_cmds($git_cmd);
}
foreach($merge_repos as $merge_repo) {
diff --git a/usr/local/www/classes/maintable.inc b/usr/local/www/classes/maintable.inc
index d3d9995..2396a0d 100644
--- a/usr/local/www/classes/maintable.inc
+++ b/usr/local/www/classes/maintable.inc
@@ -116,7 +116,7 @@ class MainTable {
} else {
$cl = 'listr';
}
- echo " <td class=\"{$cl}\" onClick=\"fr_toggle({$cur_row})\" id=\"frd{$cur_row}\" ondblclick=\"document.location=\'{$this->edit_uri}?id={$cur_row}\'\">\n";
+ echo " <td class=\"{$cl}\" onClick=\"fr_toggle({$cur_row})\" id=\"frd{$cur_row}\" ondblclick=\"document.location='{$this->edit_uri}?id={$cur_row}'\">\n";
if (is_array($row[$this->cname[$col]])) {
foreach ($row[$this->cname[$col]] as $data) {
echo " {$data}<br/>\n";
diff --git a/usr/local/www/diag_ipsec_sad.php b/usr/local/www/diag_ipsec_sad.php
index e0039ab..4400055 100755
--- a/usr/local/www/diag_ipsec_sad.php
+++ b/usr/local/www/diag_ipsec_sad.php
@@ -85,7 +85,7 @@ if ($_GET['act'] == "del") {
<?php if (count($sad)): ?>
<tr>
<td nowrap class="listhdrr"><?=gettext("Source");?></td>
- <td nowrap class="listhdrr"><?=gettext("Destination");?></a></td>
+ <td nowrap class="listhdrr"><?=gettext("Destination");?></td>
<td nowrap class="listhdrr"><?=gettext("Protocol");?></td>
<td nowrap class="listhdrr"><?=gettext("SPI");?></td>
<td nowrap class="listhdrr"><?=gettext("Enc. alg.");?></td>
diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc
index 4874ac9..c775aaa 100755
--- a/usr/local/www/fbegin.inc
+++ b/usr/local/www/fbegin.inc
@@ -156,7 +156,7 @@ $status_menu[] = array("DHCP Leases", "/status_dhcp_leases.php");
$status_menu[] = array("Filter Reload", "/status_filter_reload.php");
$status_menu[] = array("Interfaces", "/status_interfaces.php");
$status_menu[] = array("IPsec", "/diag_ipsec.php");
-$status_menu[] = array("Load Balancer", "/status_slbd_pool.php");
+$status_menu[] = array("Load Balancer", "/status_lb_pool.php");
$status_menu[] = array("OpenVPN", "/status_openvpn.php");
if ($g['platform'] == "pfSense")
$status_menu[] = array("Package Logs", "/diag_pkglogs.php");
diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php
index c4f21c1..b0abc50 100755
--- a/usr/local/www/firewall_nat_out.php
+++ b/usr/local/www/firewall_nat_out.php
@@ -305,37 +305,35 @@ include("head.inc");
<tr>
<td>
<div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td class="vtable"><p>
- <input name="advancedoripsec" type="radio" id="ipsecpassthru" value="ipsecpassthru" <?php if (isset($config['nat']['ipsecpassthru']['enable'])) echo "checked";?>>
- <strong><?=gettext("Automatic outbound NAT rule generation (IPsec passthrough)");?></strong></p>
+ <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr><td align="right"><b>Mode:</b></td>
+ <td>
+ &nbsp;&nbsp;<input name="advancedoripsec" type="radio" id="ipsecpassthru" value="ipsecpassthru" <?php if (isset($config['nat']['ipsecpassthru']['enable'])) echo "checked";?>>
+ <strong><?=gettext("Automatic outbound NAT rule generation<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(IPsec passthrough included)");?></strong>
</td>
- </tr>
- <tr>
- <td class="vtable"><p>
- <input name="advancedoripsec" type="radio" id="advancedoutbound" value="advancedoutboundnat" <?php if (isset($config['nat']['advancedoutbound']['enable'])) echo "checked";?>>
- <strong><?=gettext("Manual Outbound NAT rule generation (Advanced Outbound NAT (AON))");?></strong></p></td>
- </tr>
- <tr>
- <td> <input name="save" type="submit" class="formbtn" value="Save">
+
+ <td>
+ &nbsp;&nbsp;<input name="advancedoripsec" type="radio" id="advancedoutbound" value="advancedoutboundnat" <?php if (isset($config['nat']['advancedoutbound']['enable'])) echo "checked";?>>
+ <strong><?=gettext("Manual Outbound NAT rule generation<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(AON - Advanced Outbound NAT)");?></strong></td>
+ <td valign="middle" align="left">
+ <input name="save" type="submit" class="formbtn" value="Save">
+ &nbsp;<br/>&nbsp;
</td>
</tr>
- <tr>
- <td colspan="2"><p><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>If advanced outbound NAT is enabled, no outbound NAT
- rules will be automatically generated any longer. Instead, only the mappings
- you specify below will be used. With advanced outbound NAT disabled,
- a mapping is automatically created for each interface's subnet
- (except WAN). If you use target addresses other than the WAN interface's
- IP address, then depending on the way your WAN connection is setup, you
- may also need a <a href="firewall_virtual_ip.php">Virtual IP</a>.</span><br>
- <br>
- You may enter your own mappings below.</p>
- </td>
- </tr>
+ <tr>
+ <td colspan="5">
+ &nbsp;
+ </td>
+ </tr>
+ <tr>
+ <td class="vtable" colspan="5">
+ &nbsp;
+ </td>
+ </tr>
</table>
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr><td colspan="5"><b>&nbsp;Mappings:</b></td></tr>
+ <tr><td>&nbsp;</td></tr>
<tr id="frheader">
<td width="3%" class="list">&nbsp;</td>
<td width="3%" class="list">&nbsp;</td>
@@ -455,6 +453,19 @@ include("head.inc");
</tr>
</table></td>
</tr>
+ <tr>
+ <td colspan="12">
+ <p><span class="vexpl"><span class="red"><strong>Note:<br>
+ </strong></span>If advanced outbound NAT is enabled, no outbound NAT
+ rules will be automatically generated any longer. Instead, only the mappings
+ you specify below will be used. With advanced outbound NAT disabled,
+ a mapping is automatically created for each interface's subnet
+ (except WAN). If you use target addresses other than the WAN interface's
+ IP address, then depending on the way your WAN connection is setup, you
+ may also need a <a href="firewall_virtual_ip.php">Virtual IP</a>.</span><br>
+ </td>
+ </tr>
+
</table>
</div>
</td>
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php
index b9888e6..cd358da 100755
--- a/usr/local/www/firewall_rules.php
+++ b/usr/local/www/firewall_rules.php
@@ -98,6 +98,38 @@ if ($_POST['if'])
$ifdescs = get_configured_interface_with_descr();
+// Drag and drop reordering
+if($_REQUEST['dragdroporder']) {
+ // First create a new ruleset array and tmp arrays
+ $a_filter_unorder = array();
+ $a_filter_order = array();
+ $a_filter_order_tmp = array();
+ // Pointer to id of item being reordered
+ $found = 0;
+ $drag_order = $_REQUEST['dragtable'];
+ // Next traverse through rules building a new order for interface
+ for ($i = 0; isset($a_filter[$i]); $i++) {
+ if($a_filter[$i]['interface'] <> $_REQUEST['if'])
+ $a_filter_unorder[] = $a_filter[$i];
+ else
+ $a_filter_order_tmp[] = $a_filter[$i];
+ }
+ // Reorder rules with the posted order
+ for ($i = 0; $i<count($drag_order); $i++)
+ $a_filter_order[] = $a_filter_order_tmp[$drag_order[$i]];
+ unset($config['filter']['rule']);
+ // Overwrite filter rules with newly created items
+ $config['filter']['rule'] = $a_filter_order;
+ foreach($a_filter_unorder as $aa)
+ $config['filter']['rule'][] = $aa;
+ // Write configuration
+ $config = write_config("Drag and drop firewall rules ordering update.");
+ // Redirect back to page
+ mark_subsystem_dirty('filter');
+ Header("Location: firewall_rules.php?if=" . $_REQUEST['if']);
+ exit;
+}
+
/* add group interfaces */
if (is_array($config['ifgroups']['ifgroupentry']))
foreach($config['ifgroups']['ifgroupentry'] as $ifgen)
@@ -163,6 +195,10 @@ if ($_GET['act'] == "del") {
}
}
+// Handle save msg if defined
+if($_REQUEST['savemsg'])
+ $savemsg = htmlentities($_REQUEST['savemsg']);
+
if (isset($_POST['del_x'])) {
/* delete selected rules */
if (is_array($_POST['rule']) && count($_POST['rule'])) {
@@ -245,12 +281,17 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
<form action="firewall_rules.php" method="post">
+
<script type="text/javascript" language="javascript" src="/javascript/row_toggle.js">
</script>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('filter')): ?><p>
<?php print_info_box_np("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
<?php endif; ?>
+<div id="loading" style="visibity:hidden">
+ <img src="/themes/<?=$g['theme']?>/images/misc/loader.gif"> Loading, please wait...
+ <p/>&nbsp;
+</div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
@@ -368,6 +409,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
</td>
</tr>
<?php endif; ?>
+ <tbody id="dragtable" width="100%">
<?php $nrules = 0; for ($i = 0; isset($a_filter[$i]); $i++):
$filterent = $a_filter[$i];
if ($filterent['interface'] != $if && !isset($filterent['floating']))
@@ -589,7 +631,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
<?=$textss;?><?php if (isset($config['interfaces'][$filterent['gateway']]['descr'])) echo htmlspecialchars($config['interfaces'][$filterent['gateway']]['descr']); else echo htmlspecialchars(pprint_port($filterent['gateway'])); ?><?=$textse;?>
</td>
-<td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';"><?=$textss;?>
+ <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';"><?=$textss;?>
<?php
if (isset($filterent['ackqueue']) && isset($filterent['defaultqueue'])) {
$desc = $filterent['ackqueue'] ;
@@ -622,6 +664,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
</td>
</tr>
<?php $nrules++; endfor; ?>
+ </tbody>
<?php if ($nrules == 0): ?>
<td class="listt"></td>
<td class="listt"></td>
@@ -693,13 +736,21 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
</tr>
<tr>
<td colspan="10">
- <p>
- <strong><span class="red">Hint:<br>
- </span></strong>Rules are evaluated on a first-match basis (i.e.
+ &nbsp;<p/>
+ <strong>
+ <span class="red">Hint:</span>
+ </strong><br>
+ <ul>
+ <li>Rules are evaluated on a first-match basis (i.e.
the action of the first rule to match a packet will be executed).
This means that if you use block rules, you'll have to pay attention
to the rule order. Everything that isn't explicitly passed is blocked
- by default.</p>
+ by default.
+</li>
+<li>
+ You may drag and drop rules using your mouse to reorder the rule ordering.
+</li>
+</ul>
</td>
</tr>
</table>
@@ -708,6 +759,32 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
</tr>
</table>
<input type="hidden" name="if" value="<?=$if;?>">
+ <script type="text/javascript">
+ var number_of_rules = <?=$nrules?>;
+<?php $nrules = 0; for ($i = 0; isset($a_filter[$i]); $i++): ?>
+ Sortable.create("dragtable", {
+ tag:"tr",
+ format:"fr([0-9999999])",
+ containment:["dragtable"],
+ onChange:function(affected) {
+ document.body.style.cursor = 'move';
+ },
+ onUpdate:function(container) {
+ document.body.style.cursor = 'move';
+ updateOrder(Sortable.serialize('dragtable', 'tr'));
+ }
+ });
+<?php endfor; ?>
+ function updateOrder(order) {
+ if(document.getElementById("redboxtable"))
+ $('redboxtable').hide();
+ $('loading').show();
+ document.body.style.cursor = 'wait';
+ document.location = 'firewall_rules.php?if=<?=$if?>&dragdroporder=true&' + Sortable.serialize('dragtable', 'tr');
+ return;
+ }
+ $('loading').hide();
+ </script>
</form>
<?php include("fend.inc"); ?>
</body>
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 342b689..277ad26 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -168,7 +168,8 @@ if (isset($id) && $a_filter[$id]) {
//schedule support
$pconfig['sched'] = $a_filter[$id]['sched'];
- $pconfig['associated-rule-id'] = $a_filter[$id]['associated-rule-id'];
+ if (!isset($_GET['dup']))
+ $pconfig['associated-rule-id'] = $a_filter[$id]['associated-rule-id'];
} else {
/* defaults */
@@ -643,9 +644,10 @@ include("head.inc");
$interfaces["enc0"] = "IPsec";
/* add openvpn/tun interfaces */
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
- $interfaces["openvpn"] = "OpenVPN";
+ $interfaces["openvpn"] = "OpenVPN";
+ $selected_interfaces = explode(",", $pconfig['interface']);
foreach ($interfaces as $iface => $ifacename): ?>
- <option value="<?=$iface;?>" <?php if ($pconfig['interface'] <> "" && (strcasecmp($pconfig['interface'], $iface) == 0)) echo "selected"; ?>><?=gettext($ifacename);?></option>
+ <option value="<?=$iface;?>" <?php if ($pconfig['interface'] <> "" && ( strcasecmp($pconfig['interface'], $iface) == 0 || in_array($iface, $selected_interfaces) )) echo "selected"; ?>><?=gettext($ifacename);?></option>
<?php endforeach; ?>
</select>
<br />
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc
index 851fdec..44680aa 100755
--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -302,8 +302,12 @@ function print_info_box_np($msg, $name="apply",$value="Apply changes") {
eval($toeval);
}
+ if(!$savebutton) {
+ $savebutton = '<td class="infoboxsave"><input value="Close" type="button" onClick="$(\'redboxtable\').hide();"></td>';
+ }
+
echo <<<EOFnp
- <table class='infobox'>
+ <table class='infobox' id='redboxtable'>
<tr>
<td>
<div class='infoboxnp' id='redbox'>
@@ -319,6 +323,9 @@ function print_info_box_np($msg, $name="apply",$value="Apply changes") {
</tr>
</table>
</div>
+ <div>
+ <p/>
+ </div>
</td>
</tr>
</table>
@@ -327,15 +334,12 @@ function print_info_box_np($msg, $name="apply",$value="Apply changes") {
Rounded("div#redbox","all","#FFF","{$nifty_redbox}","smooth");
Rounded("td#blackbox","all","#FFF","{$nifty_blackbox}","smooth");
</script>
- <br/>
EOFnp;
}
function print_info_box($msg) {
- echo "<p>";
print_info_box_np($msg);
- echo "</p>";
}
function get_std_save_message($ok) {
@@ -996,4 +1000,4 @@ function rule_popup($src,$srcport,$dst,$dstport){
}
}
-?>
+?> \ No newline at end of file
diff --git a/usr/local/www/help.php b/usr/local/www/help.php
index f8f11ed..bb990b7 100644
--- a/usr/local/www/help.php
+++ b/usr/local/www/help.php
@@ -226,8 +226,8 @@ $helppages = array(
'load_balancer_relay_protocol_edit.php' => 'http://doc.pfsense.org/index.php/Category:Load_balancing',
'load_balancer_virtual_server.php' => 'http://doc.pfsense.org/index.php/Category:Load_balancing',
'load_balancer_virtual_server_edit.php' => 'http://doc.pfsense.org/index.php/Category:Load_balancing',
- 'status_slbd_pool.php' => 'http://doc.pfsense.org/index.php/Category:Load_balancing',
- 'status_slbd_vs.php' => 'http://doc.pfsense.org/index.php/Category:Load_balancing',
+ 'status_lb_pool.php' => 'http://doc.pfsense.org/index.php/Category:Load_balancing',
+ 'status_lb_vs.php' => 'http://doc.pfsense.org/index.php/Category:Load_balancing',
/* From here down are packages. Not checking these as strictly,
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 94fd82f..7d3a548 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -52,6 +52,7 @@ require_once("filter.inc");
require_once("shaper.inc");
require_once("rrd.inc");
require_once("vpn.inc");
+require_once("xmlparse_attr.inc");
if ($_REQUEST['if']) {
$if = $_REQUEST['if'];
diff --git a/usr/local/www/load_balancer_monitor.php b/usr/local/www/load_balancer_monitor.php
index 2f0f372..86f7530 100755
--- a/usr/local/www/load_balancer_monitor.php
+++ b/usr/local/www/load_balancer_monitor.php
@@ -86,8 +86,8 @@ if ($_GET['act'] == "del") {
}
$pgtitle = array("Services", "Load Balancer","Monitor");
-#$statusurl = "status_slbd_vs.php";
-$statusurl = "status_slbd_pool.php";
+#$statusurl = "status_lb_vs.php";
+$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
include("head.inc");
diff --git a/usr/local/www/load_balancer_monitor_edit.php b/usr/local/www/load_balancer_monitor_edit.php
index c3b269f..934be05 100755
--- a/usr/local/www/load_balancer_monitor_edit.php
+++ b/usr/local/www/load_balancer_monitor_edit.php
@@ -188,8 +188,8 @@ if ($_POST) {
}
$pgtitle = array("Services", "Load Balancer","Monitor","Edit");
-#$statusurl = "status_slbd_vs.php";
-$statusurl = "status_slbd_pool.php";
+#$statusurl = "status_lb_vs.php";
+$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
include("head.inc");
diff --git a/usr/local/www/load_balancer_pool.php b/usr/local/www/load_balancer_pool.php
index 4742ab1..bc97d85 100755
--- a/usr/local/www/load_balancer_pool.php
+++ b/usr/local/www/load_balancer_pool.php
@@ -95,8 +95,8 @@ for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
}
$pgtitle = array("Services", "Load Balancer","Pool");
-#$statusurl = "status_slbd_vs.php";
-$statusurl = "status_slbd_pool.php";
+#$statusurl = "status_lb_vs.php";
+$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
include("head.inc");
diff --git a/usr/local/www/load_balancer_pool_edit.php b/usr/local/www/load_balancer_pool_edit.php
index 5936d35..f34a31a 100755
--- a/usr/local/www/load_balancer_pool_edit.php
+++ b/usr/local/www/load_balancer_pool_edit.php
@@ -138,8 +138,8 @@ if ($_POST) {
}
$pgtitle = array("Services", "Load Balancer","Pool","Edit");
-#$statusurl = "status_slbd_vs.php";
-$statusurl = "status_slbd_pool.php";
+#$statusurl = "status_lb_vs.php";
+$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
include("head.inc");
diff --git a/usr/local/www/load_balancer_relay_action.php b/usr/local/www/load_balancer_relay_action.php
index 36b4b8f..5e73cfb 100755
--- a/usr/local/www/load_balancer_relay_action.php
+++ b/usr/local/www/load_balancer_relay_action.php
@@ -102,8 +102,8 @@ if ($_GET['act'] == "del") {
*/
$pgtitle = array("Services", "Load Balancer","Relay Action");
-#$statusurl = "status_slbd_vs.php";
-$statusurl = "status_slbd_pool.php";
+#$statusurl = "status_lb_vs.php";
+$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
include("head.inc");
diff --git a/usr/local/www/load_balancer_relay_action_edit.php b/usr/local/www/load_balancer_relay_action_edit.php
index dc47e45..d623fef 100755
--- a/usr/local/www/load_balancer_relay_action_edit.php
+++ b/usr/local/www/load_balancer_relay_action_edit.php
@@ -176,8 +176,8 @@ if ($_POST) {
}
$pgtitle = array("Services", "Load Balancer","Relay Action","Edit");
-#$statusurl = "status_slbd_vs.php";
-$statusurl = "status_slbd_pool.php";
+#$statusurl = "status_lb_vs.php";
+$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
include("head.inc");
diff --git a/usr/local/www/load_balancer_relay_protocol.php b/usr/local/www/load_balancer_relay_protocol.php
index f854041..d184f1d 100755
--- a/usr/local/www/load_balancer_relay_protocol.php
+++ b/usr/local/www/load_balancer_relay_protocol.php
@@ -98,8 +98,8 @@ if ($_GET['act'] == "del") {
*/
$pgtitle = array("Services", "Load Balancer","Relay Protocol");
-#$statusurl = "status_slbd_vs.php";
-$statusurl = "status_slbd_pool.php";
+#$statusurl = "status_lb_vs.php";
+$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
include("head.inc");
diff --git a/usr/local/www/load_balancer_relay_protocol_edit.php b/usr/local/www/load_balancer_relay_protocol_edit.php
index 4575aeb..519dd0b 100755
--- a/usr/local/www/load_balancer_relay_protocol_edit.php
+++ b/usr/local/www/load_balancer_relay_protocol_edit.php
@@ -132,8 +132,8 @@ if ($_POST) {
}
$pgtitle = array("Services", "Load Balancer","Relay Protocol","Edit");
-#$statusurl = "status_slbd_vs.php";
-$statusurl = "status_slbd_pool.php";
+#$statusurl = "status_lb_vs.php";
+$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
include("head.inc");
diff --git a/usr/local/www/load_balancer_virtual_server.php b/usr/local/www/load_balancer_virtual_server.php
index 9114dc9..4e6186e 100755
--- a/usr/local/www/load_balancer_virtual_server.php
+++ b/usr/local/www/load_balancer_virtual_server.php
@@ -94,8 +94,8 @@ for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) {
}
$pgtitle = array("Services","Load Balancer","Virtual Servers");
-$statusurl = "status_slbd_vs.php";
-#$statusurl = "status_slbd_pool.php";
+$statusurl = "status_lb_vs.php";
+#$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
include("head.inc");
diff --git a/usr/local/www/load_balancer_virtual_server_edit.php b/usr/local/www/load_balancer_virtual_server_edit.php
index dda2c71..0cd91e5 100755
--- a/usr/local/www/load_balancer_virtual_server_edit.php
+++ b/usr/local/www/load_balancer_virtual_server_edit.php
@@ -129,8 +129,8 @@ if ($_POST) {
}
$pgtitle = array("Services", "Load Balancer","Virtual Server","Edit");
-$statusurl = "status_slbd_vs.php";
-#$statusurl = "status_slbd_pool.php";
+$statusurl = "status_lb_vs.php";
+#$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
include("head.inc");
@@ -193,7 +193,6 @@ document.observe("dom:loaded", function() {
<td width="78%" class="vtable" colspan="2">
<input name="ipaddr" type="text" <?if(isset($pconfig['ipaddr'])) echo "value=\"{$pconfig['ipaddr']}\"";?> size="16" maxlength="16">
<br>This is normally the WAN IP address that you would like the server to listen on. All connections to this IP and port will be forwarded to the pool cluster.
- <br><b>NOTE:</b> DO NOT USE RELAY MODE WITH PROXY ARP - IT WILL NOT WORK - TODO for 2.0 to fix.
</td>
</tr>
<tr align="left">
diff --git a/usr/local/www/status_slbd_pool.php b/usr/local/www/status_lb_pool.php
index 0e8eb66..18b4c57 100755
--- a/usr/local/www/status_slbd_pool.php
+++ b/usr/local/www/status_lb_pool.php
@@ -1,7 +1,7 @@
<?php
/* $Id$ */
/*
- status_slbd_pool.php
+ status_lb_pool.php
part of pfSense (http://www.pfsense.com/)
Copyright (C) 2006 Seth Mos <seth.mos@xs4all.nl>.
@@ -36,7 +36,7 @@
##|*IDENT=page-status-loadbalancer-pool
##|*NAME=Status: Load Balancer: Pool page
##|*DESCR=Allow access to the 'Status: Load Balancer: Pool' page.
-##|*MATCH=status_slbd_pool.php*
+##|*MATCH=status_lb_pool.php*
##|-PRIV
require("guiconfig.inc");
@@ -46,7 +46,7 @@ if (!is_array($config['load_balancer']['lbpool'])) {
}
$a_pool = &$config['load_balancer']['lbpool'];
-$slbd_logfile = "{$g['varlog_path']}/slbd.log";
+$lb_logfile = "{$g['varlog_path']}/relayd.log";
$nentries = $config['syslog']['nentries'];
if (!$nentries)
@@ -67,8 +67,8 @@ include("head.inc");
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Pools", true, "status_slbd_pool.php");
- $tab_array[] = array("Virtual Servers", false, "status_slbd_vs.php");
+ $tab_array[] = array("Pools", true, "status_lb_pool.php");
+ $tab_array[] = array("Virtual Servers", false, "status_lb_vs.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -117,7 +117,7 @@ include("head.inc");
$lastchange = "";
$svr = split("\|", $server);
$monitorip = $svr[1];
- $logstates = return_clog($slbd_logfile, $nentries, true, array("$monitorip", "marking"), "", true);
+ $logstates = return_clog($lb_logfile, $nentries, true, array("$monitorip", "marking"), "", true);
$logstates = $logstates[0];
diff --git a/usr/local/www/status_slbd_vs.php b/usr/local/www/status_lb_vs.php
index f421a7f..0589425 100755
--- a/usr/local/www/status_slbd_vs.php
+++ b/usr/local/www/status_lb_vs.php
@@ -1,7 +1,7 @@
<?php
/* $Id$ */
/*
- status_slbd_vs.php
+ status_lb_vs.php
part of pfSense (http://www.pfsense.com/)
Copyright (C) 2007 Seth Mos <seth.mos@xs4all.nl>.
@@ -37,7 +37,7 @@
##|*IDENT=page-status-loadbalancer-virtualserver
##|*NAME=Status: Load Balancer: Virtual Server page
##|*DESCR=Allow access to the 'Status: Load Balancer: Virtual Server' page.
-##|*MATCH=status_slbd_vs.php*
+##|*MATCH=status_lb_vs.php*
##|-PRIV
require("guiconfig.inc");
@@ -119,8 +119,8 @@ include("head.inc");
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Pools", false, "status_slbd_pool.php");
- $tab_array[] = array("Virtual Servers", true, "status_slbd_vs.php");
+ $tab_array[] = array("Pools", false, "status_lb_pool.php");
+ $tab_array[] = array("Virtual Servers", true, "status_lb_vs.php");
display_top_tabs($tab_array);
?>
</td></tr>
diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php
index e39e93a..4b9a29a 100644
--- a/usr/local/www/vpn_openvpn_server.php
+++ b/usr/local/www/vpn_openvpn_server.php
@@ -930,7 +930,7 @@ function netbios_change() {
<tr>
<td>
<?php set_checked($pconfig['dynamic_ip'],$chk); ?>
- <input name="dynamic_ip" type="checkbox" id="dynamic_ip" value="yes" <?=$chk;?>">
+ <input name="dynamic_ip" type="checkbox" id="dynamic_ip" value="yes" <?=$chk;?>/>
</td>
<td>
<span class="vexpl">
@@ -948,7 +948,7 @@ function netbios_change() {
<tr>
<td>
<?php set_checked($pconfig['pool_enable'],$chk); ?>
- <input name="pool_enable" type="checkbox" id="pool_enable" value="yes" <?=$chk;?>">
+ <input name="pool_enable" type="checkbox" id="pool_enable" value="yes" <?=$chk;?>/>
</td>
<td>
<span class="vexpl">
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index 800bf30..540236c 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -158,6 +158,9 @@ function update_config_field($field, $updatetext, $unset, $arraynum, $field_type
eval($text);
}
+$title = preg_replace("/pfSense/i", $g['product_name'], $pkg['step'][$stepid]['title']);
+$description = preg_replace("/pfSense/i", $g['product_name'], $pkg['step'][$stepid]['description']);
+
// handle before form display event.
do {
$oldstepid = $stepid;
OpenPOWER on IntegriCloud