From 07a3b40b0bf931542fd53a48c692594a346b7577 Mon Sep 17 00:00:00 2001 From: sullrich Date: Sat, 28 Nov 2009 18:19:41 -0500 Subject: Correctly deterimine the IP address for optional interfaces. Ticket #68 --- etc/inc/dyndns.class | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'etc') diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class index af425b11..3ca641e 100644 --- a/etc/inc/dyndns.class +++ b/etc/inc/dyndns.class @@ -119,8 +119,12 @@ $this->_dnsWildcard = $dnsWildcard; $this->_dnsMX = $dnsMX; $this->_if = get_real_interface($dnsIf); - - $this->_dnsIP = get_interface_ip($dnsIf); + $this->_dnsIP = get_interface_ip($this->_if); + + // Ensure that we where able to lookup the IP + if(!$this->_dnsIP) + log_error("There was an error trying to determine the IP for interface - {$dnsIf} - {$this->_if}."); + $this->_debugID = rand(1000000, 9999999); if ($this->_detectChange() == FALSE) { @@ -141,8 +145,7 @@ $this->_dnsService == 'loopia' || $this->_dnsService == 'staticcling'|| $this->_dnsService == 'dnsexit' || - $this->_dnsService == 'opendns') - { + $this->_dnsService == 'opendns') { $this->_update(); } else { $this->_error(6); -- cgit v1.1