summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_dyndns.php
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-06-03 13:00:23 +0200
committersmos <seth.mos@dds.nl>2012-06-03 13:00:23 +0200
commitbf001dec385b1b733a01ca07fdc9946ae994c63e (patch)
tree704407a028674d678a1a180014a7cfa3cca011e8 /usr/local/www/services_dyndns.php
parent3e1eec5850cdd50974190146459c9361fe156ff5 (diff)
downloadpfsense-bf001dec385b1b733a01ca07fdc9946ae994c63e.zip
pfsense-bf001dec385b1b733a01ca07fdc9946ae994c63e.tar.gz
Allow for failover DynDNS hostnames.
replace get_real_interface() calls with get_failover_interface. If it isn't a group we call get_real_interface() anyhow. We can't put the logic inside get_real_interface() as this would create a recursion Redmine ticket #1965
Diffstat (limited to 'usr/local/www/services_dyndns.php')
-rwxr-xr-xusr/local/www/services_dyndns.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr/local/www/services_dyndns.php b/usr/local/www/services_dyndns.php
index 14402c9..b4fdc32 100755
--- a/usr/local/www/services_dyndns.php
+++ b/usr/local/www/services_dyndns.php
@@ -119,13 +119,15 @@ include("head.inc");
foreach ($iflist as $if => $ifdesc) {
if ($dyndns['interface'] == $if) {
echo "{$ifdesc}";
+ $iface = $if;
break;
}
}
$groupslist = return_gateway_groups_array();
- foreach ($groupslist as $name => $group) {
- if ($dyndns['interface'] == $name) {
- echo "{$name}";
+ foreach ($groupslist as $if => $group) {
+ if ($dyndns['interface'] == $if) {
+ echo "{$if}";
+ $iface = $if;
break;
}
}
@@ -147,8 +149,8 @@ include("head.inc");
</td>
<td class="listr">
<?php
- $filename = "{$g['conf_path']}/dyndns_{$if}{$dyndns['type']}" . escapeshellarg($dyndns['host']) . "{$dyndns['id']}.cache";
- $ipaddr = dyndnsCheckIP($if);
+ $filename = "{$g['conf_path']}/dyndns_{$iface}{$dyndns['type']}" . escapeshellarg($dyndns['host']) . "{$dyndns['id']}.cache";
+ $ipaddr = dyndnsCheckIP($iface);
if(file_exists($filename)) {
$cached_ip_s = explode(":", file_get_contents($filename));
$cached_ip = $cached_ip_s[0];
OpenPOWER on IntegriCloud