diff options
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/services_rfc2136.php | 14 | ||||
-rw-r--r-- | src/usr/local/www/services_rfc2136_edit.php | 29 |
2 files changed, 35 insertions, 8 deletions
diff --git a/src/usr/local/www/services_rfc2136.php b/src/usr/local/www/services_rfc2136.php index afb6e86..44bb1c5 100644 --- a/src/usr/local/www/services_rfc2136.php +++ b/src/usr/local/www/services_rfc2136.php @@ -123,6 +123,7 @@ if ($input_errors) { $iflist = get_configured_interface_with_descr(); +$groupslist = return_gateway_groups_array(); $i = 0; foreach ($a_rfc2136 as $rfc2136): @@ -136,6 +137,12 @@ foreach ($a_rfc2136 as $rfc2136): break; } } + foreach ($groupslist as $if => $group) { + if ($rfc2136['interface'] == $if) { + print($if); + break; + } + } ?> </td> <td> @@ -147,13 +154,14 @@ foreach ($a_rfc2136 as $rfc2136): <td> <?php $filename = "{$g['conf_path']}/dyndns_{$rfc2136['interface']}_rfc2136_" . escapeshellarg($rfc2136['host']) . "_{$rfc2136['server']}.cache"; + $if = get_failover_interface($rfc2136['interface']); if (file_exists($filename)) { print('IPv4: '); if (isset($rfc2136['usepublicip'])) { - $ipaddr = dyndnsCheckIP($rfc2136['interface']); + $ipaddr = dyndnsCheckIP($if); } else { - $ipaddr = get_interface_ip($rfc2136['interface']); + $ipaddr = get_interface_ip($if); } $cached_ip_s = explode("|", file_get_contents($filename)); @@ -175,7 +183,7 @@ foreach ($a_rfc2136 as $rfc2136): if (file_exists("{$filename}.ipv6")) { print('IPv6: '); - $ipaddr = get_interface_ipv6($rfc2136['interface']); + $ipaddr = get_interface_ipv6($if); $cached_ip_s = explode("|", file_get_contents("{$filename}.ipv6")); $cached_ip = $cached_ip_s[0]; diff --git a/src/usr/local/www/services_rfc2136_edit.php b/src/usr/local/www/services_rfc2136_edit.php index 5b74e36..fa054ab 100644 --- a/src/usr/local/www/services_rfc2136_edit.php +++ b/src/usr/local/www/services_rfc2136_edit.php @@ -157,6 +157,28 @@ if ($_POST) { } } +function build_if_list() { + $list = array(); + + $iflist = get_configured_interface_with_descr(); + + foreach ($iflist as $if => $ifdesc) { + $list[$if] = $ifdesc; + } + + unset($iflist); + + $grouplist = return_gateway_groups_array(); + + foreach ($grouplist as $name => $group) { + $list[$name] = 'GW Group ' . $name; + } + + unset($grouplist); + + return($list); +} + $pgtitle = array(gettext("Services"), gettext("Dynamic DNS"), gettext("RFC 2136 Client"), gettext("Edit")); include("head.inc"); @@ -180,17 +202,14 @@ $section->addInput(new Form_Checkbox( )); $optionlist = array(); -$iflist = get_configured_interface_with_descr(); -foreach ($iflist as $ifnam => $ifdescr) { - $optionlist[$ifnam] = $ifdescr; -} +$iflist = build_if_list(); $section->addInput(new Form_Select( 'interface', 'Interface', $pconfig['interface'], - $optionlist + $iflist )); $section->addInput(new Form_Input( |