summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_virtual_ip_edit.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-12-07 23:51:47 +0000
committerErmal <eri@pfsense.org>2010-12-07 23:51:47 +0000
commit6f247d1f76de6025079652ba8f2927be6a940ebc (patch)
tree1527f6f131c7413cb5000cec7335743d71813912 /usr/local/www/firewall_virtual_ip_edit.php
parenta00fc1e2f42d2d18989ee0ec2818de63356e4981 (diff)
downloadpfsense-6f247d1f76de6025079652ba8f2927be6a940ebc.zip
pfsense-6f247d1f76de6025079652ba8f2927be6a940ebc.tar.gz
Expose advbase option of carp(4) to alleviate advanced configs.
Diffstat (limited to 'usr/local/www/firewall_virtual_ip_edit.php')
-rwxr-xr-xusr/local/www/firewall_virtual_ip_edit.php60
1 files changed, 37 insertions, 23 deletions
diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php
index 20da793..edcde6c 100755
--- a/usr/local/www/firewall_virtual_ip_edit.php
+++ b/usr/local/www/firewall_virtual_ip_edit.php
@@ -82,6 +82,7 @@ if (isset($id) && $a_vip[$id]) {
$pconfig['mode'] = $a_vip[$id]['mode'];
$pconfig['vhid'] = $a_vip[$id]['vhid'];
$pconfig['advskew'] = $a_vip[$id]['advskew'];
+ $pconfig['advbase'] = $a_vip[$id]['advbase'];
$pconfig['password'] = $a_vip[$id]['password'];
$pconfig['range'] = $a_vip[$id]['range'];
$pconfig['subnet'] = $a_vip[$id]['subnet'];
@@ -185,6 +186,7 @@ if ($_POST) {
if ($_POST['mode'] === "carp" or $_POST['mode'] == "carpdev-dhcp") {
$vipent['vhid'] = $_POST['vhid'];
$vipent['advskew'] = $_POST['advskew'];
+ $vipent['advbase'] = $_POST['advbase'];
$vipent['password'] = $_POST['password'];
}
@@ -262,28 +264,30 @@ function enable_change(enable_over) {
document.iform.vhid.disabled = 0;
document.iform.password.disabled = 0;
document.iform.advskew.disabled = 0;
+ document.iform.advbase.disabled = 0;
document.iform.type.disabled = 1;
document.iform.subnet_bits.disabled = 0;
- document.iform.subnet.disabled = 0;
- if (note.firstChild == null) {
- note.appendChild(carpnote);
- } else {
- note.removeChild(note.firstChild);
- note.appendChild(carpnote);
- }
+ document.iform.subnet.disabled = 0;
+ if (note.firstChild == null) {
+ note.appendChild(carpnote);
+ } else {
+ note.removeChild(note.firstChild);
+ note.appendChild(carpnote);
+ }
} else {
document.iform.vhid.disabled = 1;
document.iform.password.disabled = 1;
document.iform.advskew.disabled = 1;
+ document.iform.advbase.disabled = 1;
document.iform.type.disabled = 0;
document.iform.subnet_bits.disabled = 1;
- document.iform.subnet.disabled = 0;
- if (note.firstChild == null) {
- note.appendChild(proxyarpnote);
- } else {
- note.removeChild(note.firstChild);
- note.appendChild(proxyarpnote);
- }
+ document.iform.subnet.disabled = 0;
+ if (note.firstChild == null) {
+ note.appendChild(proxyarpnote);
+ } else {
+ note.removeChild(note.firstChild);
+ note.appendChild(proxyarpnote);
+ }
}
if (get_radio_value(document.iform.mode) == "other") {
document.iform.type.disabled = 1;
@@ -307,9 +311,10 @@ function enable_change(enable_over) {
document.iform.subnet.disabled = 1;
document.iform.subnet.value = '';
document.iform.subnet_bits.value = '';
- document.iform.vhid.disabled = 0;
- document.iform.password.disabled = 0;
- document.iform.advskew.disabled = 0;
+ document.iform.vhid.disabled = 0;
+ document.iform.password.disabled = 0;
+ document.iform.advskew.disabled = 0;
+ document.iform.advbase.disabled = 0;
}
}
function typesel_change() {
@@ -431,7 +436,7 @@ function typesel_change() {
<tr valign="top">
<td width="22%" class="vncellreq"><?=gettext("VHID Group");?></td>
<td class="vtable"><select id='vhid' name='vhid'>
- <?php for ($i = 1; $i <= 65535; $i++): ?>
+ <?php for ($i = 1; $i <= 65536; $i++): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['vhid']) echo "selected"; ?>>
<?=$i;?>
</option>
@@ -442,14 +447,23 @@ function typesel_change() {
</tr>
<tr valign="top">
<td width="22%" class="vncellreq"><?=gettext("Advertising Frequency");?></td>
- <td class="vtable"><select id='advskew' name='advskew'>
+ <td class="vtable">
+ Base: <select id='advbase' name='advbase'>
+ <?php for ($i = 1; $i <= 254; $i++): ?>
+ <option value="<?=$i;?>" <?php if ($i == $pconfig['advbase']) echo "selected"; ?>>
+ <?=$i;?>
+ </option>
+ <?php endfor; ?>
+ </select>
+ Skew: <select id='advskew' name='advskew'>
<?php for ($i = 0; $i <= 254; $i++): ?>
- <option value="<?=$i;?>" <?php if ($i == $pconfig['advskew']) echo "selected"; ?>>
+ <option value="<?=$i;?>" <?php if ($i == $pconfig['advskew']) echo "selected"; ?>>
<?=$i;?>
- </option>
+ </option>
<?php endfor; ?>
- </select>
- <br><?=gettext("The frequency that this machine will advertise. 0 = master. Anything above 0 designates a backup.");?>
+ </select>
+ <br/><br/>
+ <?=gettext("The frequency that this machine will advertise. 0 means usually master. Otherwise the lowest combination of both values in the cluster detrmines the master.");?>
</td>
</tr>
<tr>
OpenPOWER on IntegriCloud