diff options
author | jim-p <jimp@pfsense.org> | 2011-06-27 14:06:33 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-06-27 14:06:33 -0400 |
commit | 8a385f42742b9f1da57f53639436f7bea0c5ada1 (patch) | |
tree | 942e8ad24b27423f5ccc418fb3be4721f954f9b2 | |
parent | 84296ca3f75378ae027cd2030d41cc41d68fc901 (diff) | |
parent | 2f3554bba15ceabca965aabb6c9cc3b4e33e88d4 (diff) | |
download | pfsense-8a385f42742b9f1da57f53639436f7bea0c5ada1.zip pfsense-8a385f42742b9f1da57f53639436f7bea0c5ada1.tar.gz |
Merge remote branch 'upstream/master'
-rw-r--r-- | etc/inc/ipsec.inc | 3 | ||||
-rw-r--r-- | etc/inc/upgrade_config.inc | 6 | ||||
-rw-r--r-- | etc/inc/vslb.inc | 26 | ||||
-rwxr-xr-x | etc/rc.restart_webgui | 2 | ||||
-rwxr-xr-x | usr/local/www/firewall_rules_edit.php | 8 | ||||
-rwxr-xr-x | usr/local/www/status_rrd_graph_settings.php | 13 |
6 files changed, 35 insertions, 23 deletions
diff --git a/etc/inc/ipsec.inc b/etc/inc/ipsec.inc index 7303dcf..aa04430 100644 --- a/etc/inc/ipsec.inc +++ b/etc/inc/ipsec.inc @@ -152,7 +152,8 @@ function ipsec_get_phase1_src(& $ph1ent) { */ function ipsec_get_phase1_dst(& $ph1ent) { global $g; - + if (!$ph1ent['remote-gateway']) + return false; $rg = $ph1ent['remote-gateway']; if (!is_ipaddr($rg)) { if(! $g['booting']) diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index 0b59ce2..0fa3b37 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -897,6 +897,8 @@ function upgrade_045_to_046() { } /* Convert sitedown entries to pools and re-attach */ for ($i = 0; isset($vs_a[$i]); $i++) { + /* Set mode while we're here. */ + $vs_a[$i]['mode'] = "redirect_mode"; if (isset($vs_a[$i]['sitedown'])) { $pool = array(); $pool['type'] = 'server'; @@ -1602,7 +1604,7 @@ function upgrade_051_to_052() { $assigned = true; continue; } else if (substr($tmpstr, 0, 5) == "local") { - $localip = substr($tmpstr, 6); + $localip = substr($tmpstr, 5); $server['ipaddr'] = str_replace("\n", "", $localip); } else $cstmopts[] = $tmpcstmopt; @@ -1704,7 +1706,7 @@ function upgrade_051_to_052() { $assigned = true; continue; } else if (substr($tmpstr, 0, 5) == "local") { - $localip = substr($tmpstr, 6); + $localip = substr($tmpstr, 5); $client['ipaddr'] = str_replace("\n", "", $localip); } else $cstmopts[] = $tmpcstmopt; diff --git a/etc/inc/vslb.inc b/etc/inc/vslb.inc index 980bcd0..c26b785 100644 --- a/etc/inc/vslb.inc +++ b/etc/inc/vslb.inc @@ -237,7 +237,19 @@ function relayd_configure() { if(is_array($vs_a)) { for ($i = 0; isset($vs_a[$i]); $i++) { switch($vs_a[$i]['mode']) { - case 'redirect_mode': { + case 'relay': + $conf .= "relay \"{$vs_a[$i]['name']}\" {\n"; + $conf .= " listen on {$vs_a[$i]['ipaddr']} port {$vs_a[$i]['port']}\n"; + $conf .= " protocol \"{$vs_a[$i]['relay_protocol']}\"\n"; + $conf .= " forward to <{$vs_a[$i]['pool']}> port {$pools[$vs_a[$i]['pool']]['port']} {$check_a[$pools[$vs_a[$i]['pool']]['monitor']]} \n"; + + if (isset($vs_a[$i]['sitedown']) && strlen($vs_a[$i]['sitedown']) > 0) + $conf .= " forward to <{$vs_a[$i]['sitedown']}> port {$pools[$vs_a[$i]['pool']]['port']} {$check_a[$pools[$vs_a[$i]['pool']]['monitor']]} \n"; + $conf .= "}\n"; + break; + /* Default to Redirect Mode */ + case 'redirect_mode': + default: $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']]} \n"; @@ -251,18 +263,6 @@ function relayd_configure() { $conf .= "}\n"; break; - } - case 'relay': { - $conf .= "relay \"{$vs_a[$i]['name']}\" {\n"; - $conf .= " listen on {$vs_a[$i]['ipaddr']} port {$vs_a[$i]['port']}\n"; - $conf .= " protocol \"{$vs_a[$i]['relay_protocol']}\"\n"; - $conf .= " forward to <{$vs_a[$i]['pool']}> port {$pools[$vs_a[$i]['pool']]['port']} {$check_a[$pools[$vs_a[$i]['pool']]['monitor']]} \n"; - - if (isset($vs_a[$i]['sitedown']) && strlen($vs_a[$i]['sitedown']) > 0) - $conf .= " forward to <{$vs_a[$i]['sitedown']}> port {$pools[$vs_a[$i]['pool']]['port']} {$check_a[$pools[$vs_a[$i]['pool']]['monitor']]} \n"; - $conf .= "}\n"; - break; - } } } } diff --git a/etc/rc.restart_webgui b/etc/rc.restart_webgui index e74f201..05eab12 100755 --- a/etc/rc.restart_webgui +++ b/etc/rc.restart_webgui @@ -10,7 +10,7 @@ require("rrd.inc"); echo "Restarting webConfigurator..."; -sigkillbyname("lighttpd", "INT"); +sigkillbyname("lighttpd", "KILL"); while (is_process_running("lighttpd")) { echo '.'; diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index 62024e2..e935e15 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -646,7 +646,7 @@ include("head.inc"); <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Associated filter rule");?></td> <td width="78%" class="vtable"> - <span class="red"><strong><?=gettext("NOTE: ");?></strong></span><?=gettext("This is associated to a NAT rule.");?><br /> + <span class="red"><strong><?=gettext("Note: ");?></strong></span><?=gettext("This is associated to a NAT rule.");?><br /> <?=gettext("You cannot edit the interface, protocol, source, or destination of associated filter rules.");?><br /> <br /> <?php @@ -1108,7 +1108,7 @@ $i--): ?> <?=gettext("State Timeout in seconds");?> </p> - <p><strong><?=gettext("NOTE: Leave fields blank to disable that feature.");?></strong></p> + <p><strong><?=gettext("Note: Leave fields blank to disable that feature.");?></strong></p> </div> </td> </tr> @@ -1166,7 +1166,7 @@ $i--): ?> <option value="sloppy state" <?php if($pconfig['statetype'] == "sloppy state") echo "selected"; ?>><?=gettext("sloppy state");?></option> <option value="synproxy state"<?php if($pconfig['statetype'] == "synproxy state") echo "selected"; ?>><?=gettext("synproxy state");?></option> <option value="none"<?php if($pconfig['statetype'] == "none") echo "selected"; ?>><?=gettext("none");?></option> - </select><br><?=gettext("HINT: Select which type of state tracking mechanism you would like to use. If in doubt, use keep state.");?> + </select><br><?=gettext("Hint: Select which type of state tracking mechanism you would like to use. If in doubt, use keep state.");?> <p> <table width="90%"> <tr><td width="25%"><ul><li><?=gettext("keep state");?></li></ul></td><td><?=gettext("Works with all IP protocols.");?></td></tr> @@ -1186,7 +1186,7 @@ $i--): ?> </div> <div id="shownoxmlrpcadv" <?php if (empty($pconfig['nosync'])) echo "style='display:none'"; ?>> <input type="checkbox" name="nosync"<?php if($pconfig['nosync']) echo " CHECKED"; ?>><br> - <?=gettext("HINT: This prevents the rule from automatically syncing to other CARP members.");?> + <?=gettext("Hint: This prevents the rule from automatically syncing to other CARP members.");?> </div> </td> </tr> diff --git a/usr/local/www/status_rrd_graph_settings.php b/usr/local/www/status_rrd_graph_settings.php index a4b562e..85061ba 100755 --- a/usr/local/www/status_rrd_graph_settings.php +++ b/usr/local/www/status_rrd_graph_settings.php @@ -62,8 +62,11 @@ $periods = array("absolute" => gettext("Absolute Timespans"), "current" => gettext("Current Period"), "previous" => gettext("Previous Period")); -if ($_POST) { - +if ($_POST['ResetRRD']) { + mwexec('/bin/rm /var/db/rrd/*'); + $retval = enable_rrd_graphing(); + $savemsg = "RRD data has been cleared. New RRD files have been generated."; +} elseif ($_POST) { unset($input_errors); $pconfig = $_POST; @@ -223,6 +226,12 @@ include("head.inc"); </td> </tr> <tr> + <td width="22%" valign="top"> </td> + <td width="78%"> + <input name="ResetRRD" type="submit" class="formbtn" value="<?=gettext("Reset RRD Data");?>" onclick="return confirm('<?=gettext('Do you really want to reset the RRD graphs? This will erase all graph data.');?>')"> + </td> + </tr> + <tr> <td width="22%" height="53" valign="top"> </td> <td width="78%"><strong><span class="red"><?=gettext("Note:");?></span></strong><br> <?=gettext("Graphs will not be allowed to be recreated within a 1 minute interval, please " . |