mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 09:04:39 +00:00
ipsec fixes related to https://github.com/opnsense/core/issues/64
This commit is contained in:
parent
4a235ca290
commit
39628a1ae6
@ -27,6 +27,7 @@
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
require_once("xmlparse.inc");
|
||||
|
||||
/* IPsec defines */
|
||||
$ipsec_loglevels = array("dmn" => "Daemon", "mgr" => "SA Manager", "ike" => "IKE SA", "chd" => "IKE Child SA",
|
||||
@ -316,12 +317,12 @@ function ipsec_phase1_status($ipsec_status, $ikeid) {
|
||||
function ipsec_smp_dump_status() {
|
||||
global $config, $g, $custom_listtags;
|
||||
|
||||
if (!file_exists("{$g['varrun_path']}/charon.xml")) {
|
||||
if (!file_exists("/var/run/charon.xml")) {
|
||||
log_error("IPsec daemon seems to have issues or not running!");
|
||||
return;
|
||||
}
|
||||
|
||||
$fd = @fsockopen("unix://{$g['varrun_path']}/charon.xml");
|
||||
$fd = @fsockopen("unix:///var/run/charon.xml");
|
||||
if (!$fd) {
|
||||
log_error("Could not read status from ipsec");
|
||||
return;
|
||||
|
||||
@ -87,10 +87,7 @@ function get_shortcut_main_link($shortcut_section, $addspace = true, $service =
|
||||
break;
|
||||
}
|
||||
if(!empty($link) && ($_SERVER['REQUEST_URI'] != "/{$link}"))
|
||||
if ($_SERVER['REQUEST_URI'] != "/status_services.php")
|
||||
return "{$space}<a href=\"{$link}\" title=\"" . gettext("Main page for this section") . "\">Main page</a>";
|
||||
else
|
||||
return "{$space}<a href=\"{$link}\" class=\"btn btn-default\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"" . gettext("Main page for this section") . "\"><span class=\"glyphicon glyphicon-home\"></span></a>";
|
||||
return "{$space}<a href=\"{$link}\" class=\"btn btn-default\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"" . gettext("Main page for this section") . "\"><span class=\"glyphicon glyphicon-home\"></span></a>";
|
||||
}
|
||||
|
||||
function get_shortcut_status_link($shortcut_section, $addspace = true, $service = array()) {
|
||||
@ -114,20 +111,14 @@ function get_shortcut_status_link($shortcut_section, $addspace = true, $service
|
||||
break;
|
||||
}
|
||||
if(!empty($link))
|
||||
if ($_SERVER['REQUEST_URI'] != "/status_services.php")
|
||||
return "{$space}<a href=\"{$link}\" title=\"" . gettext("Status of items on this page") . "\">Status</a>";
|
||||
else
|
||||
return "{$space}<a href=\"{$link}\" class=\"btn btn-default\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"" . gettext("Status of items on this page") . "\"><span class=\"glyphicon glyphicon-eye-open\"></span></a>";
|
||||
return "{$space}<a href=\"{$link}\" class=\"btn btn-default\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"" . gettext("Status of items on this page") . "\"><span class=\"glyphicon glyphicon-eye-open\"></span></a>";
|
||||
}
|
||||
|
||||
function get_shortcut_log_link($shortcut_section, $addspace = true) {
|
||||
global $g, $shortcuts;
|
||||
$space = ($addspace) ? " " : "" ;
|
||||
if(!empty($shortcut_section) && !empty($shortcuts[$shortcut_section]['log'])) {
|
||||
if ($_SERVER['REQUEST_URI'] != "/status_services.php")
|
||||
return "{$space}<a href=\"{$shortcuts[$shortcut_section]['log']}\" title=\"" . gettext("Log entries for items on this page") . "\">Log</a>";
|
||||
else
|
||||
return "{$space}<a href=\"{$shortcuts[$shortcut_section]['log']}\" class=\"btn btn-default\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"" . gettext("Log entries for items on this page") . "\"><span class=\"glyphicon glyphicon-list\"></span></a>";
|
||||
return "{$space}<a href=\"{$shortcuts[$shortcut_section]['log']}\" class=\"btn btn-default\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"" . gettext("Log entries for items on this page") . "\"><span class=\"glyphicon glyphicon-list\"></span></a>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -49,10 +49,6 @@ if (!empty($service_name)) {
|
||||
sleep(5);
|
||||
}
|
||||
|
||||
/* batch mode, allow other scripts to call this script */
|
||||
if($_GET['batch'])
|
||||
exit;
|
||||
|
||||
$pgtitle = array(gettext("Status"),gettext("Services"));
|
||||
include("head.inc");
|
||||
|
||||
|
||||
@ -451,7 +451,7 @@ include("head.inc");
|
||||
<td class="listt" align="center" valign="middle">
|
||||
<input name="togglep2_<?=$ph2index;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn?>.gif"
|
||||
title="<?=gettext("click to toggle enabled/disabled status");?>"
|
||||
type="image" style="height:11;width:11;border:0" />
|
||||
type="image" style="height:11;width:11;border:0" value="" />
|
||||
<button name="togglep2_<?=$ph2index;?>_x"
|
||||
title="<?=gettext("click to toggle enabled/disabled status");?>"
|
||||
type="submit"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user