Merge branch 'RELENG_2_1' into UNIVNAUTES_2_1
This commit is contained in:
commit
459e95a3fd
|
@ -378,17 +378,17 @@ function system_routing_configure($interface = "") {
|
|||
|
||||
$gatewayip = "";
|
||||
$interfacegw = "";
|
||||
$foundgw = false;
|
||||
$gatewayipv6 = "";
|
||||
$interfacegwv6 = "";
|
||||
$foundgw = false;
|
||||
$foundgwv6 = false;
|
||||
/* tack on all the hard defined gateways as well */
|
||||
if (is_array($config['gateways']['gateway_item'])) {
|
||||
array_map('unlink', glob("{$g['tmp_path']}/*_defaultgw{,v6}", GLOB_BRACE));
|
||||
foreach ($config['gateways']['gateway_item'] as $gateway) {
|
||||
if (isset($gateway['defaultgw'])) {
|
||||
if ($gateway['ipprotocol'] != "inet6" && (is_ipaddrv4($gateway['gateway']) || $gateway['gateway'] == "dynamic")) {
|
||||
if(strstr($gateway['gateway'], ":"))
|
||||
if ($foundgw == false && ($gateway['ipprotocol'] != "inet6" && (is_ipaddrv4($gateway['gateway']) || $gateway['gateway'] == "dynamic"))) {
|
||||
if(strpos($gateway['gateway'], ":"))
|
||||
continue;
|
||||
if ($gateway['gateway'] == "dynamic")
|
||||
$gateway['gateway'] = get_interface_gateway($gateway['interface']);
|
||||
|
@ -400,7 +400,7 @@ function system_routing_configure($interface = "") {
|
|||
@file_put_contents("{$g['tmp_path']}/{$defaultif}_defaultgw", $gateway['gateway']);
|
||||
}
|
||||
$foundgw = true;
|
||||
} else if ($gateway['ipprotocol'] == "inet6" && (is_ipaddrv6($gateway['gateway']) || $gateway['gateway'] == "dynamic")) {
|
||||
} else if ($foundgwv6 == false && ($gateway['ipprotocol'] == "inet6" && (is_ipaddrv6($gateway['gateway']) || $gateway['gateway'] == "dynamic"))) {
|
||||
if ($gateway['gateway'] == "dynamic")
|
||||
$gateway['gateway'] = get_interface_gateway_v6($gateway['interface']);
|
||||
$gatewayipv6 = $gateway['gateway'];
|
||||
|
@ -421,13 +421,13 @@ function system_routing_configure($interface = "") {
|
|||
$defaultif = get_real_interface("wan");
|
||||
$interfacegw = "wan";
|
||||
$gatewayip = get_interface_gateway("wan");
|
||||
@touch("{$g['tmp_path']}/{$defaultif}_defaultgw");
|
||||
@file_put_contents("{$g['tmp_path']}/{$defaultif}_defaultgw", $gatewayip);
|
||||
}
|
||||
if ($foundgwv6 == false) {
|
||||
$defaultifv6 = get_real_interface("wan");
|
||||
$interfacegwv6 = "wan";
|
||||
$gatewayipv6 = get_interface_gateway_v6("wan");
|
||||
@touch("{$g['tmp_path']}/{$defaultif}_defaultgwv6");
|
||||
@file_put_contents("{$g['tmp_path']}/{$defaultifv6}_defaultgwv6", $gatewayipv6);
|
||||
}
|
||||
$dont_add_route = false;
|
||||
/* if OLSRD is enabled, allow WAN to house DHCP. */
|
||||
|
|
|
@ -1991,7 +1991,7 @@ function upgrade_054_to_055() {
|
|||
/* restore the databases, if we have one */
|
||||
if (restore_rrd()) {
|
||||
/* Make sure to move the rrd backup out of the way. We will make a new one after converting. */
|
||||
rename("{$g['cf_conf_path']}/rrd.tgz", "{$g['cf_conf_path']}/backup");
|
||||
@rename("{$g['cf_conf_path']}/rrd.tgz", "{$g['cf_conf_path']}/backup/rrd.tgz");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3107,7 +3107,7 @@ function upgrade_095_to_096() {
|
|||
/* restore the databases, if we have one */
|
||||
if (restore_rrd()) {
|
||||
/* Make sure to move the rrd backup out of the way. We will make a new one after converting. */
|
||||
rename("{$g['cf_conf_path']}/rrd.tgz", "{$g['cf_conf_path']}/backup");
|
||||
@rename("{$g['cf_conf_path']}/rrd.tgz", "{$g['cf_conf_path']}/backup/rrd.tgz");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -496,7 +496,7 @@ if ($intip6 != '') {
|
|||
}
|
||||
|
||||
if ($intip != '' || $intip6 != '') {
|
||||
if (count($ifdescrs) == "1" or $interface = "lan") {
|
||||
if (count($ifdescrs) == "1" or $interface == "lan") {
|
||||
if ($debug) {
|
||||
echo "ifdescrs count is " . count($ifdescrs) . "\n";
|
||||
echo "interface is {$interface} \n";
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/*
|
||||
interfaces_bridge.php
|
||||
|
||||
Copyright (C) 2008 Ermal Luçi
|
||||
Copyright (C) 2008 Ermal Luçi
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
@ -60,9 +60,9 @@ function bridge_inuse($num) {
|
|||
|
||||
if ($_GET['act'] == "del") {
|
||||
if (!isset($_GET['id']))
|
||||
$input_errors[] = getext("Wrong parameters supplied");
|
||||
$input_errors[] = gettext("Wrong parameters supplied");
|
||||
else if (empty($a_bridges[$_GET['id']]))
|
||||
$input_errors[] = getext("Wrong index supplied");
|
||||
$input_errors[] = gettext("Wrong index supplied");
|
||||
/* check if still in use */
|
||||
else if (bridge_inuse($_GET['id'])) {
|
||||
$input_errors[] = gettext("This bridge cannot be deleted because it is assigned as an interface.");
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/*
|
||||
interfaces_gif.php
|
||||
|
||||
Copyright (C) 2008 Ermal Luçi
|
||||
Copyright (C) 2008 Ermal Luçi
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
@ -60,9 +60,9 @@ function gif_inuse($num) {
|
|||
|
||||
if ($_GET['act'] == "del") {
|
||||
if (!isset($_GET['id']))
|
||||
$input_errors[] = getext("Wrong parameters supplied");
|
||||
$input_errors[] = gettext("Wrong parameters supplied");
|
||||
else if (empty($a_gifs[$_GET['id']]))
|
||||
$input_errors[] = getext("Wrong index supplied");
|
||||
$input_errors[] = gettext("Wrong index supplied");
|
||||
/* check if still in use */
|
||||
else if (gif_inuse($_GET['id'])) {
|
||||
$input_errors[] = gettext("This gif TUNNEL cannot be deleted because it is still being used as an interface.");
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/*
|
||||
interfaces_gre.php
|
||||
|
||||
Copyright (C) 2008 Ermal Luçi
|
||||
Copyright (C) 2008 Ermal Luçi
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
@ -61,9 +61,9 @@ function gre_inuse($num) {
|
|||
|
||||
if ($_GET['act'] == "del") {
|
||||
if (!isset($_GET['id']))
|
||||
$input_errors[] = getext("Wrong parameters supplied");
|
||||
$input_errors[] = gettext("Wrong parameters supplied");
|
||||
else if (empty($a_gres[$_GET['id']]))
|
||||
$input_errors[] = getext("Wrong index supplied");
|
||||
$input_errors[] = gettext("Wrong index supplied");
|
||||
/* check if still in use */
|
||||
else if (gre_inuse($_GET['id'])) {
|
||||
$input_errors[] = gettext("This GRE tunnel cannot be deleted because it is still being used as an interface.");
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/*
|
||||
interfaces_lagg.php
|
||||
|
||||
Copyright (C) 2008 Ermal Luçi
|
||||
Copyright (C) 2008 Ermal Luçi
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
@ -66,9 +66,9 @@ function lagg_inuse($num) {
|
|||
|
||||
if ($_GET['act'] == "del") {
|
||||
if (!isset($_GET['id']))
|
||||
$input_errors[] = getext("Wrong parameters supplied");
|
||||
$input_errors[] = gettext("Wrong parameters supplied");
|
||||
else if (empty($a_laggs[$_GET['id']]))
|
||||
$input_errors[] = getext("Wrong index supplied");
|
||||
$input_errors[] = gettext("Wrong index supplied");
|
||||
/* check if still in use */
|
||||
else if (lagg_inuse($_GET['id'])) {
|
||||
$input_errors[] = gettext("This LAGG interface cannot be deleted because it is still being used.");
|
||||
|
|
|
@ -61,9 +61,9 @@ function vlan_inuse($num) {
|
|||
|
||||
if ($_GET['act'] == "del") {
|
||||
if (!isset($_GET['id']))
|
||||
$input_errors[] = getext("Wrong parameters supplied");
|
||||
$input_errors[] = gettext("Wrong parameters supplied");
|
||||
else if (empty($a_vlans[$_GET['id']]))
|
||||
$input_errors[] = getext("Wrong index supplied");
|
||||
$input_errors[] = gettext("Wrong index supplied");
|
||||
/* check if still in use */
|
||||
else if (vlan_inuse($_GET['id'])) {
|
||||
$input_errors[] = gettext("This VLAN cannot be deleted because it is still being used as an interface.");
|
||||
|
|
|
@ -65,6 +65,16 @@ function doCmdT($title, $command) {
|
|||
$line = preg_replace("/<password>.*?<\\/password>/", "<password>xxxxx</password>", $line);
|
||||
$line = preg_replace("/<pre-shared-key>.*?<\\/pre-shared-key>/", "<pre-shared-key>xxxxx</pre-shared-key>", $line);
|
||||
$line = preg_replace("/<rocommunity>.*?<\\/rocommunity>/", "<rocommunity>xxxxx</rocommunity>", $line);
|
||||
$line = preg_replace("/<prv>.*?<\\/prv>/", "<prv>xxxxx</prv>", $line);
|
||||
$line = preg_replace("/<ipsecpsk>.*?<\\/ipsecpsk>/", "<ipsecpsk>xxxxx</ipsecpsk>", $line);
|
||||
$line = preg_replace("/<md5-hash>.*?<\\/md5-hash>/", "<md5-hash>xxxxx</md5-hash>", $line);
|
||||
$line = preg_replace("/<md5password>.*?<\\/md5password>/", "<md5password>xxxxx</md5password>", $line);
|
||||
$line = preg_replace("/<nt-hash>.*?<\\/nt-hash>/", "<nt-hash>xxxxx</nt-hash>", $line);
|
||||
$line = preg_replace("/<radius_secret>.*?<\\/radius_secret>/", "<radius_secret>xxxxx</radius_secret>", $line);
|
||||
$line = preg_replace("/<ldap_bindpw>.*?<\\/ldap_bindpw>/", "<ldap_bindpw>xxxxx</ldap_bindpw>", $line);
|
||||
$line = preg_replace("/<passwordagain>.*?<\\/passwordagain>/", "<passwordagain>xxxxx</passwordagain>", $line);
|
||||
$line = preg_replace("/<crypto_password>.*?<\\/crypto_password>/", "<crypto_password>xxxxx</crypto_password>", $line);
|
||||
$line = preg_replace("/<crypto_password2>.*?<\\/crypto_password2>/", "<crypto_password2>xxxxx</crypto_password2>", $line);
|
||||
$line = str_replace("\t", " ", $line);
|
||||
echo htmlspecialchars($line,ENT_NOQUOTES);
|
||||
}
|
||||
|
|
Reference in New Issue