diff options
author | Seth Mos <seth.mos@dds.nl> | 2011-03-14 22:02:50 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@dds.nl> | 2011-03-14 22:02:50 +0100 |
commit | e79b24ab3534ac2af7d832038155a99902bc2c49 (patch) | |
tree | ec7058f26e17c6c13408c783e50cd8c245b51c90 /usr/local/www/vpn_ipsec_phase1.php | |
parent | 6c4f3b54a05b20bfe5fbc52206a1980308b539b3 (diff) | |
download | pfsense-e79b24ab3534ac2af7d832038155a99902bc2c49.zip pfsense-e79b24ab3534ac2af7d832038155a99902bc2c49.tar.gz |
Extend the IPsec configuration with a protocol family for the phase 1
Diffstat (limited to 'usr/local/www/vpn_ipsec_phase1.php')
-rw-r--r-- | usr/local/www/vpn_ipsec_phase1.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/usr/local/www/vpn_ipsec_phase1.php b/usr/local/www/vpn_ipsec_phase1.php index 12bb235..c537f9f 100644 --- a/usr/local/www/vpn_ipsec_phase1.php +++ b/usr/local/www/vpn_ipsec_phase1.php @@ -80,6 +80,7 @@ if (isset($p1index) && $a_phase1[$p1index]) { $pconfig['remotegw'] = $a_phase1[$p1index]['remote-gateway']; $pconfig['mode'] = $a_phase1[$p1index]['mode']; + $pconfig['protocol'] = $a_phase1[$p1index]['protocol']; $pconfig['myid_type'] = $a_phase1[$p1index]['myid_type']; $pconfig['myid_data'] = $a_phase1[$p1index]['myid_data']; $pconfig['peerid_type'] = $a_phase1[$p1index]['peerid_type']; @@ -113,6 +114,7 @@ if (isset($p1index) && $a_phase1[$p1index]) { if($config['interfaces']['lan']) $pconfig['localnet'] = "lan"; $pconfig['mode'] = "aggressive"; + $pconfig['protocol'] = "inet"; $pconfig['myid_type'] = "myaddress"; $pconfig['peerid_type'] = "peeraddress"; $pconfig['authentication_method'] = "pre_shared_key"; @@ -292,6 +294,7 @@ if ($_POST) { $ph1ent['remote-gateway'] = $pconfig['remotegw']; $ph1ent['mode'] = $pconfig['mode']; + $ph1ent['protocol'] = $pconfig['protocol']; $ph1ent['myid_type'] = $pconfig['myid_type']; $ph1ent['myid_data'] = $pconfig['myid_data']; @@ -510,6 +513,21 @@ function dpdchkbox_change() { </td> </tr> <tr> + <td width="22%" valign="top" class="vncellreq"><?=gettext("Internet Protocol"); ?></td> + <td width="78%" class="vtable"> + <select name="protocol" class="formselect"> + <?php + $protocols = array("inet" => "IPv4", "inet6" => "IPv6"); + foreach ($protocols as $protocol => $name): + ?> + <option value="<?=$protocol;?>" <?php if ($protocol == $pconfig['protocol']) echo "selected"; ?>> + <?=htmlspecialchars($name);?> + </option> + <?php endforeach; ?> + </select> <br> <span class="vexpl"><?=gettext("Select the Internet Protocol family from this dropdown"); ?>.</span> + </td> + </tr> + <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td> <td width="78%" class="vtable"> <select name="interface" class="formselect"> |