From c7127a130022e92c1f762c35fdb85df723757384 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 3 Feb 2016 12:49:36 -0500 Subject: Implement Multi-WAN for RFC2136. A failover gateway group may be selected similar to the other DynDNS styles. --- src/usr/local/www/services_rfc2136_edit.php | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'src/usr/local/www/services_rfc2136_edit.php') 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( -- cgit v1.1