mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Add 'any' option for peer ID, for mobile IPsec scenarios where you can't or don't want to check peer ID.
Conflicts: usr/local/www/vpn_ipsec_phase1.php
This commit is contained in:
parent
f674922ee9
commit
b099481141
@ -54,6 +54,7 @@ $my_identifier_list = array(
|
||||
|
||||
global $peer_identifier_list;
|
||||
$peer_identifier_list = array(
|
||||
'any' => array('desc' => gettext('Any'), 'mobile' => true),
|
||||
'peeraddress' => array('desc' => gettext('Peer IP address'), 'mobile' => false),
|
||||
'address' => array('desc' => gettext('IP address'), 'mobile' => false),
|
||||
'fqdn' => array('desc' => gettext('Distinguished name'), 'mobile' => true),
|
||||
|
||||
@ -862,7 +862,9 @@ EOD;
|
||||
// Only specify peer ID if we are not dealing with mobile PSK
|
||||
} else {
|
||||
list ($peerid_type, $peerid_data) = ipsec_find_id($ph1ent, 'peer', $rgmap);
|
||||
if ($peerid_type != 'address' && $peerid_type != 'keyid' && $peerid_type != 'asn1dn') {
|
||||
if ($peerid_type == 'any') {
|
||||
$peerid_spec = '';
|
||||
} elseif ($peerid_type != 'address' && $peerid_type != 'keyid' && $peerid_type != 'asn1dn') {
|
||||
$peerid_spec = "{$peerid_type}:{$peerid_data}";
|
||||
} elseif ($peerid_type == "asn1dn") {
|
||||
/* asn1dn needs double quotes */
|
||||
|
||||
@ -529,7 +529,9 @@ function peeridsel_change() {
|
||||
value = document.iform.peerid_type.options[index].value;
|
||||
if (value == 'peeraddress') {
|
||||
document.getElementById('peerid_data').style.visibility = 'hidden';
|
||||
} else {
|
||||
} else if (value == 'any') {
|
||||
document.getElementById('peerid_data').style.visibility = 'hidden';
|
||||
} else {
|
||||
document.getElementById('peerid_data').style.visibility = 'visible';
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user