diff options
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/firewall_rules_edit.php | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index f442cec..c35cfa6 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -1080,6 +1080,7 @@ include("head.inc"); <div id="showgatewayadv" style="display:none"> <select name='gateway'> <?php + // add statically configured gateways to list foreach($gateways as $gw) { if($gw == "") continue; @@ -1095,6 +1096,19 @@ include("head.inc"); echo "<option value=\"{$gw}\" {$selected}>{$gw} - {$gwip}</option>\n"; } } + // add dynamic gateways to list + $iflist = get_configured_interface_with_descr(); + foreach ($iflist as $ifent => $ifdesc) { + if (in_array($config['interfaces'][$ifent]['ipaddr'], array("dhcp", "pppoe", "pptp"))) { + if ($pconfig['gateway'] == $ifent) { + $selected = " SELECTED"; + } else { + $selected = ""; + } + if($ifdesc <> "") + echo "<option value=\"{$ifent}\" {$selected}>".strtoupper($ifent)." - {$ifdesc}</option>\n"; + } + } /* add gateway groups to the list */ if (is_array($config['gateways']['gateway_group'])) { foreach($config['gateways']['gateway_group'] as $gw_group) { @@ -1107,19 +1121,6 @@ include("head.inc"); } } } - $iflist = get_configured_interface_with_descr(); - foreach ($iflist as $ifent => $ifdesc) { - if (in_array($config['interfaces'][$ifent]['ipaddr'], - array("dhcp", "pppoe", "pptp"))) { - if ($pconfig['gateway'] == $ifent) { - $selected = " SELECTED"; - } else { - $selected = ""; - } - if($ifdesc <> "") - echo "<option value=\"{$ifent}\" {$selected}>".strtoupper($if)." - {$ifdesc}</option>\n"; - } - } ?> </select> <p><strong>Leave as 'default' to use the system routing table. Or choose a gateway to utilize policy based routing.</strong></p> |