diff options
author | Renato Botelho <garga@pfSense.org> | 2014-03-10 16:41:36 -0300 |
---|---|---|
committer | Renato Botelho <garga@pfSense.org> | 2014-03-10 16:41:36 -0300 |
commit | 56b4084469ac143d738c75d4429f816de89fbd99 (patch) | |
tree | 4dfe968eeb5fa48f57eece04195247d9e621e813 | |
parent | 52c7f0d4ac88b1c981340edb66e1290eb057d89f (diff) | |
parent | 5d1185ced7e08036759feebdfa7b9e0cbe98427d (diff) | |
download | pfsense-56b4084469ac143d738c75d4429f816de89fbd99.zip pfsense-56b4084469ac143d738c75d4429f816de89fbd99.tar.gz |
Merge pull request #1012 from florian-asche/patch-1
Update services.inc
-rw-r--r-- | etc/inc/services.inc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index e4fcdb0..11f2d04 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -2106,9 +2106,13 @@ function services_dnsupdate_process($int = "", $updatehost = "", $forced = false /* determine interface name */ $if = get_real_interface($dnsupdate['interface']); - $wanip = get_interface_ip($dnsupdate['interface']); + + if (isset($dnsupdate['usepublicip'])) + $wanip = dyndnsCheckIP($dnsupdate['interface']); + else + $wanip = get_interface_ip($dnsupdate['interface']); + $wanipv6 = get_interface_ipv6($dnsupdate['interface']); - $cacheFile = "{$g['conf_path']}/dyndns_{$dnsupdate['interface']}_rfc2136_" . escapeshellarg($dnsupdate['host']) . "_{$dnsupdate['server']}.cache"; $currentTime = time(); @@ -2172,9 +2176,6 @@ EOD; /* Update IPv4 if we have it. */ if (is_ipaddrv4($wanip)) { if (($wanip != $cachedipv4) || (($currentTime - $cacheTimev4) > $maxCacheAgeSecs) || $forced) { - if (isset($dnsupdate['usepublicip'])) { - $wanip = dyndnsCheckIP($dnsupdate['interface']); - } $upinst .= "update delete {$dnsupdate['host']}. A\n"; $upinst .= "update add {$dnsupdate['host']}. {$dnsupdate['ttl']} A {$wanip}\n"; $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"; |