diff options
author | jim-p <jimp@pfsense.org> | 2011-09-27 17:13:02 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-09-27 19:05:01 -0400 |
commit | e3522ebf9579aa35f269fffb7e90b3c8f5adb091 (patch) | |
tree | 182ab266567dda1cac392f7ff21776386a4541d0 /usr/local | |
parent | a486425f5df533eea08e17a47f24d7c3d8c4e8b2 (diff) | |
download | pfsense-e3522ebf9579aa35f269fffb7e90b3c8f5adb091.zip pfsense-e3522ebf9579aa35f269fffb7e90b3c8f5adb091.tar.gz |
Fixup relayd to handle DNS load balancing as well as standard TCP load balancing.
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/load_balancer_virtual_server.php | 2 | ||||
-rwxr-xr-x | usr/local/www/load_balancer_virtual_server_edit.php | 35 |
2 files changed, 19 insertions, 18 deletions
diff --git a/usr/local/www/load_balancer_virtual_server.php b/usr/local/www/load_balancer_virtual_server.php index 69ea9a4..624f418 100755 --- a/usr/local/www/load_balancer_virtual_server.php +++ b/usr/local/www/load_balancer_virtual_server.php @@ -126,7 +126,7 @@ include("head.inc"); $t->edit_uri('load_balancer_virtual_server_edit.php'); $t->my_uri('load_balancer_virtual_server.php'); $t->add_column(gettext('Name'),'name',10); - $t->add_column(gettext('Mode'),'mode',10); + $t->add_column(gettext('Protocol'),'relay_protocol',10); $t->add_column(gettext('IP Address'),'ipaddr',15); $t->add_column(gettext('Port'),'port',10); $t->add_column(gettext('Pool'),'pool',15); diff --git a/usr/local/www/load_balancer_virtual_server_edit.php b/usr/local/www/load_balancer_virtual_server_edit.php index 96a557c..8340a93 100755 --- a/usr/local/www/load_balancer_virtual_server_edit.php +++ b/usr/local/www/load_balancer_virtual_server_edit.php @@ -194,7 +194,7 @@ document.observe("dom:loaded", function() { <tr align="left"> <td width="22%" valign="top" class="vncellreq"><?=gettext("IP Address"); ?></td> <td width="78%" class="vtable" colspan="2"> - <input name="ipaddr" type="text" <?if(isset($pconfig['ipaddr'])) echo "value=\"{$pconfig['ipaddr']}\"";?> size="16" maxlength="16"> + <input name="ipaddr" type="text" <?if(isset($pconfig['ipaddr'])) echo "value=\"{$pconfig['ipaddr']}\"";?> size="39" maxlength="39"> <br><?=gettext("This is normally the WAN IP address that you would like the server to listen on. All connections to this IP and port will be forwarded to the pool cluster."); ?> </td> </tr> @@ -257,22 +257,23 @@ document.observe("dom:loaded", function() { </td> </tr> --> - <tr id="relay" align="left" style="display:none;"> - <td width="22%" valign="top" class="vncellreq"><?=gettext("Relay Protocol"); ?></td> - <td width="78%" class="vtable" colspan="2"> - <select id="relay_protocol" name="relay_protocol"> - <?php - for ($i = 0; isset($config['load_balancer']['lbprotocol'][$i]); $i++) { - $selected = ""; - if ( $config['load_balancer']['lbprotocol'][$i]['name'] == $pconfig['lbprotocol'] ) - $selected = " SELECTED"; - echo "<option value=\"{$config['load_balancer']['lbprotocol'][$i]['name']}\"{$selected}>{$config['load_balancer']['lbprotocol'][$i]['name']}</option>"; - } - ?> - </select> - <br> - </td> - </tr> + <tr id="relay" align="left"> + <td width="22%" valign="top" class="vncellreq"><?=gettext("Relay Protocol"); ?></td> + <td width="78%" class="vtable" colspan="2"> + <select id="relay_protocol" name="relay_protocol"> + <?php + $lb_def_protos = array("tcp", "dns"); + foreach ($lb_def_protos as $lb_proto) { + $selected = ""; + if ( $pconfig['relay_protocol'] == $lb_proto ) + $selected = " SELECTED"; + echo "<option value=\"{$lb_proto}\"{$selected}>{$lb_proto}</option>"; + } + ?> + </select> + <br> + </td> + </tr> <tr align="left"> <td align="left" valign="bottom"> <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>"> |