summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-03-18 01:58:05 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-03-18 01:58:05 +0000
commit87e72a5896df5771d6d54678f61dfd30b0f07de9 (patch)
treec87ee24ffea7291b80afa8e0ee1cfd9540b20331 /usr
parent9f8e19f424f3774e400abdfddc8e101006500fdf (diff)
downloadpfsense-87e72a5896df5771d6d54678f61dfd30b0f07de9.zip
pfsense-87e72a5896df5771d6d54678f61dfd30b0f07de9.tar.gz
Allow CARP addresses to be the IPSEC endpoint. This cleans up the code GREATLY and removes the FAILOVER IPSEC hack.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/vpn_ipsec.php9
-rwxr-xr-xusr/local/www/vpn_ipsec_edit.php10
2 files changed, 15 insertions, 4 deletions
diff --git a/usr/local/www/vpn_ipsec.php b/usr/local/www/vpn_ipsec.php
index fca3a55..e149666 100755
--- a/usr/local/www/vpn_ipsec.php
+++ b/usr/local/www/vpn_ipsec.php
@@ -152,9 +152,14 @@ include("head.inc");
<td class="listr" ondblclick="document.location='vpn_ipsec_edit.php?id=<?=$i;?>'"><?=$spans;?>
<?php if ($ipsecent['interface']) {
$iflabels = array('lan' => 'LAN', 'wan' => 'WAN');
- for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++)
+ $carpips = find_number_of_needed_carp_interfaces();
+ for($i=0; $i<$carpips; $i++) {
+ $carpip = find_interface_ip("carp" . $i);
+ $iflabels['carp' . $i] = "CARP{$i} - $carpip";
+ }
+ for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++)
$iflabels['opt' . $j] = $config['interfaces']['opt' . $j]['descr'];
- $if = htmlspecialchars($iflabels[$ipsecent['interface']]);
+ $if = htmlspecialchars($iflabels[$ipsecent['interface']]);
} else
$if = "WAN";
diff --git a/usr/local/www/vpn_ipsec_edit.php b/usr/local/www/vpn_ipsec_edit.php
index 2b9ec75..d0ce5a4 100755
--- a/usr/local/www/vpn_ipsec_edit.php
+++ b/usr/local/www/vpn_ipsec_edit.php
@@ -316,13 +316,19 @@ function methodsel_change() {
<span class="vexpl">Set this option to disable this tunnel without
removing it from the list.</span></td>
</tr>
- <tr>
+ <tr>
<td width="22%" valign="top" class="vncellreq">Interface</td>
<td width="78%" class="vtable"><select name="interface" class="formfld">
- <?php $interfaces = array('wan' => 'WAN', 'lan' => 'LAN');
+ <?php
+ $interfaces = array('wan' => 'WAN', 'lan' => 'LAN');
for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) {
$interfaces['opt' . $i] = $config['interfaces']['opt' . $i]['descr'];
}
+ $carpips = find_number_of_needed_carp_interfaces();
+ for($i=0; $i<$carpips; $i++) {
+ $carpip = find_interface_ip("carp" . $i);
+ $interfaces['carp' . $i] = "CARP{$i} - $carpip";
+ }
foreach ($interfaces as $iface => $ifacename): ?>
<option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected"; ?>>
<?=htmlspecialchars($ifacename);?>
OpenPOWER on IntegriCloud