Commit 70a2bcf6 authored by Franco Fichtner's avatar Franco Fichtner

dyndns: fix a crash report

parent af7776e6
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
/* load up the dyndns.class */
require_once("dyndns.class"); require_once('dyndns.class');
require_once('unbound.inc'); require_once('unbound.inc');
require_once('miniupnpd.inc'); require_once('miniupnpd.inc');
...@@ -1756,9 +1756,12 @@ function services_dyndns_configure($int = '') ...@@ -1756,9 +1756,12 @@ function services_dyndns_configure($int = '')
return 0; return 0;
} }
function dyndnsCheckIP($int) { function dyndnsCheckIP($int)
{
global $config; global $config;
$ip_address = get_interface_ip($int); $ip_address = get_interface_ip($int);
if (is_private_ip($ip_address)) { if (is_private_ip($ip_address)) {
$gateways_status = return_gateways_status(true); $gateways_status = return_gateways_status(true);
// If the gateway for this interface is down, then the external check cannot work. // If the gateway for this interface is down, then the external check cannot work.
......
...@@ -33,13 +33,13 @@ require_once("services.inc"); ...@@ -33,13 +33,13 @@ require_once("services.inc");
require_once("interfaces.inc"); require_once("interfaces.inc");
require_once("pfsense-utils.inc"); require_once("pfsense-utils.inc");
if (!isset($config['dyndnses']['dyndns'])) if (!isset($config['dyndnses']['dyndns'])) {
$config['dyndnses']['dyndns'] = array(); $config['dyndnses']['dyndns'] = array();
}
$a_dyndns = &$config['dyndnses']['dyndns']; $a_dyndns = &$config['dyndnses']['dyndns'];
if ($_GET['act'] == "del") { if ($_GET['act'] == "del") {
$conf = $a_dyndns[$_GET['id']]; $conf = $a_dyndns[$_GET['id']];
@unlink("/conf/dyndns_{$conf['interface']}{$conf['type']}" . escapeshellarg($conf['host']) . "{$conf['id']}.cache"); @unlink("/conf/dyndns_{$conf['interface']}{$conf['type']}" . escapeshellarg($conf['host']) . "{$conf['id']}.cache");
unset($a_dyndns[$_GET['id']]); unset($a_dyndns[$_GET['id']]);
......
...@@ -30,9 +30,11 @@ ...@@ -30,9 +30,11 @@
require_once("guiconfig.inc"); require_once("guiconfig.inc");
require_once("interfaces.inc"); require_once("interfaces.inc");
require_once("services.inc"); require_once("services.inc");
require_once("pfsense-utils.inc");
if (!isset($config['dnsupdates']['dnsupdate'])) if (!isset($config['dnsupdates']['dnsupdate'])) {
$config['dnsupdates']['dnsupdate'] = array(); $config['dnsupdates']['dnsupdate'] = array();
}
$a_rfc2136 = &$config['dnsupdates']['dnsupdate']; $a_rfc2136 = &$config['dnsupdates']['dnsupdate'];
......
...@@ -36,7 +36,7 @@ require_once("widgets/include/dyn_dns_status.inc"); ...@@ -36,7 +36,7 @@ require_once("widgets/include/dyn_dns_status.inc");
require_once("services.inc"); require_once("services.inc");
require_once("interfaces.inc"); require_once("interfaces.inc");
if (!is_array($config['dyndnses']['dyndns'])) { if (!isset($config['dyndnses']['dyndns'])) {
$config['dyndnses']['dyndns'] = array(); $config['dyndnses']['dyndns'] = array();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment