diff options
author | Seth Mos <seth.mos@dds.nl> | 2011-03-11 22:34:53 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@dds.nl> | 2011-03-11 22:34:53 +0100 |
commit | 3795d067c95977ec4b4ddf95714236185cce5ac5 (patch) | |
tree | 718c372d4c9f5776f720f81749dd12866f63c38c /usr | |
parent | 1529458011a6aabcf39f01592a9971bf2c337696 (diff) | |
download | pfsense-3795d067c95977ec4b4ddf95714236185cce5ac5.zip pfsense-3795d067c95977ec4b4ddf95714236185cce5ac5.tar.gz |
Add the ability to differentiate between v4 and v6 tunnels. Bill says he can test
Diffstat (limited to 'usr')
-rw-r--r-- | usr/local/www/vpn_ipsec_phase2.php | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/usr/local/www/vpn_ipsec_phase2.php b/usr/local/www/vpn_ipsec_phase2.php index d45b0d6..a4dcbdb 100644 --- a/usr/local/www/vpn_ipsec_phase2.php +++ b/usr/local/www/vpn_ipsec_phase2.php @@ -118,7 +118,7 @@ if ($_POST) { do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); - if($pconfig['mode'] == "tunnel") + if(($pconfig['mode'] == "tunnel") || ($pconfig['mode'] == "tunnel6")) { switch ($pconfig['localid_type']) { case "network": @@ -158,7 +158,7 @@ if ($_POST) { $ph2ent['mode'] = $pconfig['mode']; $ph2ent['disabled'] = $pconfig['disabled'] ? true : false; - if($ph2ent['mode'] == "tunnel") { + if(($ph2ent['mode'] == "tunnel") || ($ph2ent['mode'] == "tunnel6")){ $ph2ent['localid'] = pconfig_to_idinfo("local",$pconfig); $ph2ent['remoteid'] = pconfig_to_idinfo("remote",$pconfig); } @@ -216,7 +216,7 @@ include("head.inc"); function change_mode() { index = document.iform.mode.selectedIndex; value = document.iform.mode.options[index].value; - if (value == 'tunnel') { + if ((value == 'tunnel') || (value == 'tunnel6')) { document.getElementById('opt_localid').style.display = ''; <?php if (!isset($pconfig['mobile'])): ?> document.getElementById('opt_remoteid').style.display = ''; @@ -231,8 +231,14 @@ function change_mode() { function typesel_change_local(bits) { - if (typeof(bits)=="undefined") - bits = 24; + if (typeof(bits)=="undefined") { + if (value == 'tunnel') { + bits = 24; + } + if (value == 'tunnel6') { + bits = 64; + } + } switch (document.iform.localid_type.selectedIndex) { case 0: /* single */ @@ -262,8 +268,14 @@ function typesel_change_local(bits) { function typesel_change_remote(bits) { - if (typeof(bits)=="undefined") - bits = 24; + if (typeof(bits)=="undefined") { + if (value == 'tunnel') { + bits = 24; + } + if (value == 'tunnel6') { + bits = 64; + } + } switch (document.iform.remoteid_type.selectedIndex) { case 0: /* single */ @@ -376,7 +388,7 @@ function change_protocol() { <input name="localid_address" type="text" class="formfld unknown" id="localid_address" size="20" value="<?=htmlspecialchars($pconfig['localid_address']);?>"> / <select name="localid_netbits" class="formselect" id="localid_netbits"> - <?php for ($i = 32; $i >= 0; $i--): ?> + <?php for ($i = 128; $i >= 0; $i--): ?> <option value="<?=$i;?>" <?php if ($i == $pconfig['localid_netbits']) echo "selected"; ?>> <?=$i;?> </option> @@ -411,7 +423,7 @@ function change_protocol() { <input name="remoteid_address" type="text" class="formfld unknown" id="remoteid_address" size="20" value="<?=htmlspecialchars($pconfig['remoteid_address']);?>"> / <select name="remoteid_netbits" class="formselect" id="remoteid_netbits"> - <?php for ($i = 32; $i >= 0; $i--) { + <?php for ($i = 128; $i >= 0; $i--) { echo "<option value=\"{$i}\""; if ($i == $pconfig['remoteid_netbits']) echo " selected"; |