mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
dyndns: fix a crash report
This commit is contained in:
parent
af7776e6f0
commit
70a2bcf6e5
@ -27,8 +27,8 @@
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/* load up the dyndns.class */
|
||||
require_once("dyndns.class");
|
||||
|
||||
require_once('dyndns.class');
|
||||
require_once('unbound.inc');
|
||||
require_once('miniupnpd.inc');
|
||||
|
||||
@ -1756,9 +1756,12 @@ function services_dyndns_configure($int = '')
|
||||
return 0;
|
||||
}
|
||||
|
||||
function dyndnsCheckIP($int) {
|
||||
function dyndnsCheckIP($int)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$ip_address = get_interface_ip($int);
|
||||
|
||||
if (is_private_ip($ip_address)) {
|
||||
$gateways_status = return_gateways_status(true);
|
||||
// If the gateway for this interface is down, then the external check cannot work.
|
||||
|
||||
@ -33,13 +33,13 @@ require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("pfsense-utils.inc");
|
||||
|
||||
if (!isset($config['dyndnses']['dyndns']))
|
||||
if (!isset($config['dyndnses']['dyndns'])) {
|
||||
$config['dyndnses']['dyndns'] = array();
|
||||
}
|
||||
|
||||
$a_dyndns = &$config['dyndnses']['dyndns'];
|
||||
|
||||
if ($_GET['act'] == "del") {
|
||||
|
||||
$conf = $a_dyndns[$_GET['id']];
|
||||
@unlink("/conf/dyndns_{$conf['interface']}{$conf['type']}" . escapeshellarg($conf['host']) . "{$conf['id']}.cache");
|
||||
unset($a_dyndns[$_GET['id']]);
|
||||
|
||||
@ -30,9 +30,11 @@
|
||||
require_once("guiconfig.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("services.inc");
|
||||
require_once("pfsense-utils.inc");
|
||||
|
||||
if (!isset($config['dnsupdates']['dnsupdate']))
|
||||
if (!isset($config['dnsupdates']['dnsupdate'])) {
|
||||
$config['dnsupdates']['dnsupdate'] = array();
|
||||
}
|
||||
|
||||
$a_rfc2136 = &$config['dnsupdates']['dnsupdate'];
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ require_once("widgets/include/dyn_dns_status.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
|
||||
if (!is_array($config['dyndnses']['dyndns'])) {
|
||||
if (!isset($config['dyndnses']['dyndns'])) {
|
||||
$config['dyndnses']['dyndns'] = array();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user