Project

General

Profile

« Previous | Next » 

Revision ceb90928

Added by Renato Botelho over 8 years ago

Use the same cache filename pattern for RFC2136 IPv6 items as used by dyndns

View differences:

src/etc/inc/services.inc
2574 2574

  
2575 2575
			$wanipv6 = get_interface_ipv6($if);
2576 2576
			$cacheFile = "{$g['conf_path']}/dyndns_{$dnsupdate['interface']}_rfc2136_" . escapeshellarg($dnsupdate['host']) . "_{$dnsupdate['server']}.cache";
2577
			$cacheFilev6 = $cacheFile . ".ipv6";
2577
			$cacheFilev6 = "{$g['conf_path']}/dyndns_{$dnsupdate['interface']}_rfc2136_" . escapeshellarg($dnsupdate['host']) . "_{$dnsupdate['server']}_v6.cache";
2578 2578
			$currentTime = time();
2579 2579

  
2580 2580
			if ($wanip || $wanipv6) {
src/usr/local/www/services_rfc2136.php
153 153
							<td>
154 154
<?php
155 155
	$filename = "{$g['conf_path']}/dyndns_{$rfc2136['interface']}_rfc2136_" . escapeshellarg($rfc2136['host']) . "_{$rfc2136['server']}.cache";
156
	$filename_v6 = "{$g['conf_path']}/dyndns_{$rfc2136['interface']}_rfc2136_" . escapeshellarg($rfc2136['host']) . "_{$rfc2136['server']}_v6.cache";
156 157
	$if = get_failover_interface($rfc2136['interface']);
157 158

  
158 159
	if (file_exists($filename)) {
......
180 181

  
181 182
	print('<br />');
182 183

  
183
	if (file_exists("{$filename}.ipv6")) {
184
	if (file_exists($filename_v6)) {
184 185
		print('IPv6: ');
185 186
		$ipaddr = get_interface_ipv6($if);
186
		$cached_ip_s = explode("|", file_get_contents("{$filename}.ipv6"));
187
		$cached_ip_s = explode("|", file_get_contents($filename_v6));
187 188
		$cached_ip = $cached_ip_s[0];
188 189

  
189 190
		if ($ipaddr != $cached_ip) {

Also available in: Unified diff