Project

General

Profile

« Previous | Next » 

Revision 5d1185ce

Added by Florian Asche over 11 years ago

Update services.inc

View differences:

etc/inc/services.inc
2112 2112
                        else
2113 2113
                                $wanip = get_interface_ip($dnsupdate['interface']);
2114 2114
			
2115
			//$wanip = get_interface_ip($dnsupdate['interface']);
2116 2115
			$wanipv6 = get_interface_ipv6($dnsupdate['interface']);
2117

  
2118 2116
			$cacheFile = "{$g['conf_path']}/dyndns_{$dnsupdate['interface']}_rfc2136_" . escapeshellarg($dnsupdate['host']) . "_{$dnsupdate['server']}.cache";
2119 2117
			$currentTime = time();
2120 2118

  
......
2178 2176
				/* Update IPv4 if we have it. */
2179 2177
				if (is_ipaddrv4($wanip)) {
2180 2178
					if (($wanip != $cachedipv4) || (($currentTime - $cacheTimev4) > $maxCacheAgeSecs) || $forced) {
2181
						if (isset($dnsupdate['usepublicip'])) {
2182
							$wanip = dyndnsCheckIP($dnsupdate['interface']);
2183
						}
2184 2179
						$upinst .= "update delete {$dnsupdate['host']}. A\n";
2185 2180
						$upinst .= "update add {$dnsupdate['host']}. {$dnsupdate['ttl']} A {$wanip}\n";
2186 2181
						$notify_text .= sprintf(gettext("DynDNS updated IP Address (A) for {$dnsupdate['host']} on %s (%s) to %s"), convert_real_interface_to_friendly_descr($if), $if, $wanip) . "\n";

Also available in: Unified diff