Revision 9bca2575
Added by Ermal Luçi about 17 years ago
etc/inc/dyndns.class | ||
---|---|---|
78 | 78 |
* - Gets the dice rolling for the update. |
79 | 79 |
*/ |
80 | 80 |
function updatedns ($dnsService = '', $dnsHost = '', $dnsUser = '', $dnsPass = '', |
81 |
$dnsWildcard = 'OFF', $dnsMX = '', $dnsBackMX = '', $dnsWanip = '', |
|
82 |
$dnsServer = '', $dnsPort = '', $dnsUpdateURL = '', $if = '') {
|
|
81 |
$dnsWildcard = 'OFF', $dnsMX = '', $dnsIf = '', $dnsBackMX = '', $dnsWanip = '',
|
|
82 |
$dnsServer = '', $dnsPort = '', $dnsUpdateURL = '') { |
|
83 | 83 |
|
84 | 84 |
global $config; |
85 | 85 |
|
86 |
$this->_cacheFile = "/cf/conf/dyndns_{$if}.cache";
|
|
87 |
$this->_debugFile = "/var/etc/dyndns_{$if}.debug";
|
|
86 |
$this->_cacheFile = "/cf/conf/dyndns_{$dnsIf}.cache";
|
|
87 |
$this->_debugFile = "/var/etc/dyndns_{$dnsIf}.debug";
|
|
88 | 88 |
|
89 | 89 |
log_error("DynDns: updatedns() starting"); |
90 | 90 |
|
... | ... | |
112 | 112 |
$this->_dnsPort = $dnsPort; |
113 | 113 |
$this->_dnsWildcard = $dnsWildcard; |
114 | 114 |
$this->_dnsMX = $dnsMX; |
115 |
$this->_if = $if;
|
|
115 |
$this->_if = $dnsIf;
|
|
116 | 116 |
|
117 | 117 |
if(!$wan_ip) |
118 |
$wan_ip = get_current_wan_address($if);
|
|
118 |
$wan_ip = get_current_wan_address($dnsIf);
|
|
119 | 119 |
|
120 | 120 |
$this->_dnsIP = $wan_ip; |
121 | 121 |
$this->_debugID = rand(1000000, 9999999); |
etc/inc/services.inc | ||
---|---|---|
496 | 496 |
if (!isset($dyndns['enable'])) |
497 | 497 |
continue; |
498 | 498 |
/* determine interface name */ |
499 |
if ($dyndns['interface'] == "wan") |
|
500 |
$if = get_real_wan_interface(); |
|
501 |
else |
|
502 |
$if = convert_friendly_interface_to_real_interface_name($dyndns['interface']); |
|
499 |
$if = get_real_wan_interface($dyndns['interface']); |
|
503 | 500 |
|
504 | 501 |
if ($g['booting']) { |
505 | 502 |
echo "Starting DynDNS clients..."; |
... | ... | |
530 | 527 |
$dnsUser = $dyndns['username'], |
531 | 528 |
$dnsPass = $dyndns['password'], |
532 | 529 |
$dnsWilcard = $dyndns['wildcard'], |
533 |
$dnsMX = $dyndns['mx'], $dnsIf = $if);
|
|
530 |
$dnsMX = $dyndns['mx'], $dnsIf = "{$if}");
|
|
534 | 531 |
|
535 | 532 |
} |
536 | 533 |
|
Also available in: Unified diff
Make dyndns work correctly there was a problem in parameters order passed to the class.