summaryrefslogtreecommitdiffstats
path: root/etc/inc/ipsec.inc
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-01-15 10:13:57 +0100
committerErmal LUÇI <eri@pfsense.org>2015-01-15 10:13:57 +0100
commit4e8eacfd7c0f1909c15d85b4cae2302b0ba3f0fc (patch)
tree030e587a430e8e1c2905b87b2e3c98ecdf500d03 /etc/inc/ipsec.inc
parent23de1f0decfcdc1a08b31762b8ab972e112c2dc8 (diff)
downloadpfsense-4e8eacfd7c0f1909c15d85b4cae2302b0ba3f0fc.zip
pfsense-4e8eacfd7c0f1909c15d85b4cae2302b0ba3f0fc.tar.gz
Revert "Move to specifically specifying the ID type apart when an ip address to have strongswan do proper behaviour. Also for DynDNS names use the dns type id so strongswan does the resolving by its own."
This reverts commit 1ada4c8c514cc33b0df6238b7f2f177078bfe2e8.
Diffstat (limited to 'etc/inc/ipsec.inc')
-rw-r--r--etc/inc/ipsec.inc42
1 files changed, 20 insertions, 22 deletions
diff --git a/etc/inc/ipsec.inc b/etc/inc/ipsec.inc
index 71e10e1..e04f342 100644
--- a/etc/inc/ipsec.inc
+++ b/etc/inc/ipsec.inc
@@ -622,41 +622,39 @@ function ipsec_find_id(& $ph1ent, $side = "local", $rgmap = array()) {
$addr = "%any";
else
$addr = $ph1ent['remote-gateway'];
- } else
+ } else {
return array();
+ }
$thisid_type = $id_type;
switch ($thisid_type) {
- case 'myaddress':
- $thisid_type = 'address';
+ case "myaddress":
+ $thisid_type = "address";
$thisid_data = $addr;
break;
- case 'dyn_dns':
- $thisid_type = 'dns';
- $thisid_data = $id_data;
+
+ case "dyn_dns":
+ $thisid_type = "address";
+ $thisid_data = resolve_retry($id_data);
break;
- case 'peeraddress':
- $thisid_type = 'address';
+
+ case "peeraddress":
+ $thisid_type = "address";
$thisid_data = $rgmap[$ph1ent['remote-gateway']];
break;
- case 'address';
+
+ case "address";
$thisid_data = $id_data;
break;
- case 'fqdn';
- $thisid_data = "{$id_data}";
- break;
- case 'keyid tag';
- $thisid_type = 'keyid';
- $thisid_data = "{$thisid_data}";
- break;
- case 'user_fqdn';
- $thisid_type = 'userfqdn';
- $thisid_data = "{$id_data}";
- break;
- case 'asn1dn';
+
+ case "fqdn";
+ case "keyid tag";
+ case "user_fqdn";
+ case "asn1dn";
$thisid_data = $id_data;
- $thisid_data = "{$id_data}";
+ if( $thisid_data )
+ $thisid_data = "{$thisid_data}";
break;
}
return array($thisid_type, $thisid_data);
OpenPOWER on IntegriCloud