diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-05-17 02:16:46 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-05-17 02:16:46 +0000 |
commit | 3eee46dc2548471a7857900d40183d169e2a6cd7 (patch) | |
tree | 7617f3c776c087d761626b8a7429d3fc7a114b4b /etc | |
parent | 379c277b6e91dcd797e401e9f537f385f02ab143 (diff) | |
download | pfsense-3eee46dc2548471a7857900d40183d169e2a6cd7.zip pfsense-3eee46dc2548471a7857900d40183d169e2a6cd7.tar.gz |
Do not quote an empty string when the DN identifier is blank.
Obtained-from: m0n0wall
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/vpn.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index f72e16f..caef20a 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -320,6 +320,10 @@ function vpn_ipsec_configure($ipchg = false) { $myident = gethostbyname($tunnel['p1']['myident']['dyn_dns']); } + if (!($myidentt == "asn1dn" && $myident == "")) { + $myident = " \"".$myident."\""; + } + $nattline = ''; if (isset($tunnel['natt'])) { $nattline = "nat_traversal on;"; @@ -384,7 +388,7 @@ EOD; $racoonconf .= <<<EOD remote {$tunnel['remote-gateway']} \{ exchange_mode {$tunnel['p1']['mode']}; - my_identifier {$myidentt} "{$myident}"; + my_identifier {$myidentt}{$myident}; {$certline} peers_identifier address {$tunnel['remote-gateway']}; initial_contact on; @@ -492,7 +496,7 @@ EOD; $racoonconf .= <<<EOD remote anonymous \{ exchange_mode {$tunnel['p1']['mode']}; - my_identifier {$myidentt} "{$myident}"; + my_identifier {$myidentt}{$myident}; {$nattline} {$certline} initial_contact on; |