diff options
author | Sebastian Chrostek <sebastian@chrostek.net> | 2013-06-01 14:37:56 +0200 |
---|---|---|
committer | Sebastian Chrostek <sebastian@chrostek.net> | 2013-06-01 14:37:56 +0200 |
commit | aa79f3518283d82e03a745702ff51ba04c200acb (patch) | |
tree | d6803615136ef1bd5831d0ffbc7db83905542596 /etc/inc | |
parent | 9399370b367df7b73b84d605f4f44599c93b0bbe (diff) | |
download | pfsense-aa79f3518283d82e03a745702ff51ba04c200acb.zip pfsense-aa79f3518283d82e03a745702ff51ba04c200acb.tar.gz |
Added CURL options to Custom DynDNS
Added the options for CURLOPT_IPRESOLVE and CURLOPT_SSL_VERIFYPEER in
the webinterface for custom DynDNS
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/dyndns.class | 12 | ||||
-rw-r--r-- | etc/inc/services.inc | 4 |
2 files changed, 14 insertions, 2 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class index ff72bd8..014721d 100644 --- a/etc/inc/dyndns.class +++ b/etc/inc/dyndns.class @@ -99,6 +99,8 @@ var $_dnsRequestIf; var $_dnsRequestIfIP; var $_dnsVerboseLog; + var $_curlIpresolveV4; + var $_curlSslVerifypeer; var $_dnsMaxCacheAgeDays; var $_dnsDummyUpdateDone; var $_forceUpdateNeeded; @@ -116,13 +118,15 @@ $dnsWildcard = 'OFF', $dnsMX = '', $dnsIf = '', $dnsBackMX = '', $dnsServer = '', $dnsPort = '', $dnsUpdateURL = '', $forceUpdate = false, $dnsZoneID ='', $dnsTTL='', $dnsResultMatch = '', $dnsRequestIf = '', - $dnsID = '', $dnsVerboseLog = false) { + $dnsID = '', $dnsVerboseLog = false, $curlIpresolveV4 = false, $curlSslVerifypeer = true) { global $config, $g; $this->_cacheFile = "{$g['conf_path']}/dyndns_{$dnsIf}{$dnsService}" . escapeshellarg($dnsHost) . "{$dnsID}.cache"; $this->_debugFile = "{$g['varetc_path']}/dyndns_{$dnsIf}{$dnsService}" . escapeshellarg($dnsHost) . "{$dnsID}.debug"; + $this->_curlIpresolveV4 = $curlIpresolveV4; + $this->_curlSslVerifypeer = $curlSslVerifypeer; $this->_dnsVerboseLog = $dnsVerboseLog; if ($this->_dnsVerboseLog) log_error("DynDns: updatedns() starting"); @@ -569,6 +573,12 @@ log_error("Custom DDNS ({$this->_dnsHost}): DNS update() starting."); if (strstr($this->dnsUpdateURL, "%IP%")) {$needsIP = TRUE;} else {$needsIP = FALSE;} if ($this->_dnsUser != '') { + if ($this->_curlIpresolveV4) + curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); + if ($this->_curlSslVerifypeer) + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE); + else + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_USERPWD, "{$this->_dnsUser}:{$this->_dnsPass}"); } diff --git a/etc/inc/services.inc b/etc/inc/services.inc index dbffe39..95e9264 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -1549,7 +1549,9 @@ function services_dyndns_configure_client($conf) { $dnsResultMatch = "{$conf['resultmatch']}", $dnsRequestIf = "{$conf['requestif']}", $dnsID = "{$conf['id']}", - $dnsVerboseLog = $conf['verboselog']); + $dnsVerboseLog = $conf['verboselog'], + $curlIpresolveV4 = $conf['curl_ipresolve_v4'], + $curlSslVerifypeer = $conf['curl_ssl_verifypeer']); } function services_dyndns_configure($int = "") { |