summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_gateways_edit.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-04-30 14:32:25 +0000
committerErmal <eri@pfsense.org>2010-04-30 14:32:25 +0000
commit5f53260a2da559c71a5de91dc5c6a332e664b24e (patch)
treeecc42481ed81b7349b47bdf5b45f3cfca3da08cc /usr/local/www/system_gateways_edit.php
parent05f3ffa431cf622828d311dd9b9b8ea49f9d1006 (diff)
downloadpfsense-5f53260a2da559c71a5de91dc5c6a332e664b24e.zip
pfsense-5f53260a2da559c71a5de91dc5c6a332e664b24e.tar.gz
Allow for each gateway a weight to be choosen if the gateway has to be used in Gateway groups. This will create that many entries in the route-to statement as the weight says.
Diffstat (limited to 'usr/local/www/system_gateways_edit.php')
-rwxr-xr-xusr/local/www/system_gateways_edit.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index daa2abf..60b8700 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -64,6 +64,7 @@ if (isset($_GET['dup'])) {
if (isset($id) && $a_gateways[$id]) {
$pconfig['name'] = $a_gateways[$id]['name'];
+ $pconfig['weight'] = $a_gateways[$id]['weight'];
$pconfig['interface'] = $a_gateways[$id]['interface'];
$pconfig['friendlyiface'] = $a_gateways[$id]['friendlyiface'];
$pconfig['gateway'] = $a_gateways[$id]['gateway'];
@@ -168,6 +169,7 @@ if ($_POST) {
$gateway = array();
$gateway['interface'] = $_POST['interface'];
$gateway['name'] = $_POST['name'];
+ $gateway['weight'] = $_POST['weight'];
$gateway['gateway'] = $_POST['gateway'];
$gateway['descr'] = $_POST['descr'];
if(is_ipaddr($_POST['monitor'])) {
@@ -308,6 +310,22 @@ function enable_change(obj) {
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell">Weight</td>
+ <td width="78%" class="vtable">
+ <select name='weight' class='formfldselect' id='weight'>
+ <?php
+ for ($i = 1; $i < 6; $i++) {
+ $selected = "";
+ if ($pconfig['weight'] == $i)
+ $selected = "selected";
+ echo "<option value='{$i}' {$selected} >{$i}</option>";
+ }
+ ?>
+ </select>
+ <strong>Weight for this gateway when used in a Gateway Group.</strong> <br />
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell">Description</td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
OpenPOWER on IntegriCloud