From 9bca25755268495f7459efa61eff4cf7dafb90e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=C3=A7i?= Date: Sat, 19 Jul 2008 21:47:45 +0000 Subject: Make dyndns work correctly there was a problem in parameters order passed to the class. --- etc/inc/dyndns.class | 12 ++++++------ etc/inc/services.inc | 7 ++----- 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'etc/inc') diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class index e9eca07..e29309f 100644 --- a/etc/inc/dyndns.class +++ b/etc/inc/dyndns.class @@ -78,13 +78,13 @@ * - Gets the dice rolling for the update. */ function updatedns ($dnsService = '', $dnsHost = '', $dnsUser = '', $dnsPass = '', - $dnsWildcard = 'OFF', $dnsMX = '', $dnsBackMX = '', $dnsWanip = '', - $dnsServer = '', $dnsPort = '', $dnsUpdateURL = '', $if = '') { + $dnsWildcard = 'OFF', $dnsMX = '', $dnsIf = '', $dnsBackMX = '', $dnsWanip = '', + $dnsServer = '', $dnsPort = '', $dnsUpdateURL = '') { global $config; - $this->_cacheFile = "/cf/conf/dyndns_{$if}.cache"; - $this->_debugFile = "/var/etc/dyndns_{$if}.debug"; + $this->_cacheFile = "/cf/conf/dyndns_{$dnsIf}.cache"; + $this->_debugFile = "/var/etc/dyndns_{$dnsIf}.debug"; log_error("DynDns: updatedns() starting"); @@ -112,10 +112,10 @@ $this->_dnsPort = $dnsPort; $this->_dnsWildcard = $dnsWildcard; $this->_dnsMX = $dnsMX; - $this->_if = $if; + $this->_if = $dnsIf; if(!$wan_ip) - $wan_ip = get_current_wan_address($if); + $wan_ip = get_current_wan_address($dnsIf); $this->_dnsIP = $wan_ip; $this->_debugID = rand(1000000, 9999999); diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 0825942..b2fb155 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -496,10 +496,7 @@ function services_dyndns_configure() { if (!isset($dyndns['enable'])) continue; /* determine interface name */ - if ($dyndns['interface'] == "wan") - $if = get_real_wan_interface(); - else - $if = convert_friendly_interface_to_real_interface_name($dyndns['interface']); + $if = get_real_wan_interface($dyndns['interface']); if ($g['booting']) { echo "Starting DynDNS clients..."; @@ -530,7 +527,7 @@ function services_dyndns_configure() { $dnsUser = $dyndns['username'], $dnsPass = $dyndns['password'], $dnsWilcard = $dyndns['wildcard'], - $dnsMX = $dyndns['mx'], $dnsIf = $if); + $dnsMX = $dyndns['mx'], $dnsIf = "{$if}"); } -- cgit v1.1