diff options
author | jim-p <jimp@pfsense.org> | 2013-07-02 16:42:21 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-07-02 16:58:05 -0400 |
commit | 6d8dd98bf42e3104d7576f7a681d951ce12cbe71 (patch) | |
tree | 27b99f765db9e3bee55792ea7320a5e55140a451 /etc | |
parent | a04da9bfb60b00b0accfea46d5f362a0bc240e28 (diff) | |
download | pfsense-6d8dd98bf42e3104d7576f7a681d951ce12cbe71.zip pfsense-6d8dd98bf42e3104d7576f7a681d951ce12cbe71.tar.gz |
Add option to RFC2136 to find/use the public IP if the interface IP is private. (Off by default)
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/services.inc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 381d1b9..de2cdfa 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -2024,6 +2024,9 @@ 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"; |