summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2014-03-13 02:42:42 -0500
committerChris Buechler <cmb@pfsense.org>2014-03-13 02:43:01 -0500
commit1b92cc614969b19bc7c217f1f0c1d10a85ff7977 (patch)
treee410f3a6a55dea3112c0f1e0a40fd17630b0f283 /etc
parent541e0b77367a6ed72b5e40b38f1afd701bc84436 (diff)
downloadpfsense-1b92cc614969b19bc7c217f1f0c1d10a85ff7977.zip
pfsense-1b92cc614969b19bc7c217f1f0c1d10a85ff7977.tar.gz
use xmlrpcbaseurl here too, not product_website
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc18
1 files changed, 11 insertions, 7 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 6d82437..c195a14 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -670,12 +670,14 @@ function rmdir_recursive($path,$follow_links=false) {
function call_pfsense_method($method, $params, $timeout = 0) {
global $g, $config;
- $ip = gethostbyname($g['xmlrpcbaseurl']);
- if($ip == $g['xmlrpcbaseurl'])
- return false;
-
$xmlrpc_base_url = isset($config['system']['altpkgrepo']['enable']) ? $config['system']['altpkgrepo']['xmlrpcbaseurl'] : $g['xmlrpcbaseurl'];
$xmlrpc_path = $g['xmlrpcpath'];
+
+ $xmlrpcfqdn = preg_replace("(https?://)", "", $xmlrpc_base_url);
+ $ip = gethostbyname($xmlrpcfqdn);
+ if($ip == $xmlrpcfqdn)
+ return false;
+
$msg = new XML_RPC_Message($method, array(XML_RPC_Encode($params)));
$port = 0;
$proxyurl = "";
@@ -715,9 +717,11 @@ function call_pfsense_method($method, $params, $timeout = 0) {
*/
function check_firmware_version($tocheck = "all", $return_php = true) {
global $g, $config;
-
- $ip = gethostbyname($g['product_website']);
- if($ip == $g['product_website'])
+
+ $xmlrpc_base_url = isset($config['system']['altpkgrepo']['enable']) ? $config['system']['altpkgrepo']['xmlrpcbaseurl'] : $g['xmlrpcbaseurl'];
+ $xmlrpcfqdn = preg_replace("(https?://)", "", $xmlrpc_base_url);
+ $ip = gethostbyname($xmlrpcfqdn);
+ if($ip == $xmlrpcfqdn)
return false;
$rawparams = array("firmware" => array("version" => trim(file_get_contents('/etc/version'))),
OpenPOWER on IntegriCloud