summaryrefslogtreecommitdiffstats
path: root/etc/inc/vpn.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-05-17 02:16:40 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-05-17 02:16:40 +0000
commitd597b0b912a26602bb86a3c6091d5a32d2ce9bb2 (patch)
treef27fc598aab39c94e6d3f34ce67a2b9d0cdda376 /etc/inc/vpn.inc
parent38275404072ed96dce3ca8a1e8a0385c47d8083a (diff)
downloadpfsense-d597b0b912a26602bb86a3c6091d5a32d2ce9bb2.zip
pfsense-d597b0b912a26602bb86a3c6091d5a32d2ce9bb2.tar.gz
Do not quote an empty string when the DN identifier is blank.
Obtained-from: m0n0wall
Diffstat (limited to 'etc/inc/vpn.inc')
-rw-r--r--etc/inc/vpn.inc12
1 files changed, 10 insertions, 2 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 3cf5b13..c5b2298 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -346,6 +346,14 @@ function vpn_ipsec_configure($ipchg = false) {
$myident = gethostbyname($tunnel['p1']['myident']['dyn_dns']);
}
+ if (!($myidentt == "asn1dn" && $myident == "")) {
+ $myident = " \"".$myident."\"";
+ }
+
+ if (!($myidentt == "asn1dn" && $myident == "")) {
+ $myident = " \"".$myident."\"";
+ }
+
$nattline = '';
if (isset($tunnel['natt'])) {
$nattline = "nat_traversal on;";
@@ -415,7 +423,7 @@ EOD;
$racoonconf .=<<<EOD
remote {$tunnel['remote-gateway']} \{
exchange_mode {$tunnel['p1']['mode']};
- my_identifier {$myidentifier};
+ my_identifier {$myidentt}{$myident};
{$nattline}
{$certline}
peers_identifier address {$rgip};
@@ -529,7 +537,7 @@ EOD;
$racoonconf .=<<<EOD
remote anonymous \{
exchange_mode {$tunnel['p1']['mode']};
- my_identifier {$myidentt} "{$myident}";
+ my_identifier {$myidentt}{$myident};
{$certline}
initial_contact on;
dpd_delay 120; # DPD poll every 120 seconds
OpenPOWER on IntegriCloud