summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-07-19 21:47:45 +0000
committerErmal Luçi <eri@pfsense.org>2008-07-19 21:47:45 +0000
commit9bca25755268495f7459efa61eff4cf7dafb90e3 (patch)
treeb4b8bee483e75b2c949f85506b39446ab2a9720d
parent8ab1c5e2abe8149b03a3f70fe6630037e40cdcf7 (diff)
downloadpfsense-9bca25755268495f7459efa61eff4cf7dafb90e3.zip
pfsense-9bca25755268495f7459efa61eff4cf7dafb90e3.tar.gz
Make dyndns work correctly there was a problem in parameters order passed to the class.
-rw-r--r--etc/inc/dyndns.class12
-rw-r--r--etc/inc/services.inc7
2 files changed, 8 insertions, 11 deletions
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}");
}
OpenPOWER on IntegriCloud