From 86488702f28a90fcdf0568abdd2c15f056ae1581 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 18 Mar 2009 01:59:57 -0400 Subject: Query host with host and also check this against cached address. --- usr/local/www/services_dyndns.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr/local/www/services_dyndns.php b/usr/local/www/services_dyndns.php index 1ddb905..6a0d059 100755 --- a/usr/local/www/services_dyndns.php +++ b/usr/local/www/services_dyndns.php @@ -109,10 +109,11 @@ include("head.inc"); $real_int = get_real_interface($if); $filename = "{$g['conf_path']}/dyndns_{$int}dyndns.cache"; if(file_exists($filename)) { + $dns_resolv = str_replace("\n", "", `host {$dyndns['host']} | awk '{ print $4 }'`); $cached_ip_s = split(":", file_get_contents($filename)); $cached_ip = $cached_ip_s[0]; $int_ip = find_interface_ip($real_int); - if($int_ip <> $cached_ip) + if($int_ip <> $cached_ip or $dns_resolv <> $int_ip) echo ""; else echo ""; -- cgit v1.1