summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-02-25 16:19:26 +0100
committerErmal LUÇI <eri@pfsense.org>2015-02-25 16:19:41 +0100
commitca5f5db15679683fddd2b0bf89c24cb1d031f2ff (patch)
tree12214d8c0c359f128657fe8b906bfb74e7d730fa
parent82e6fde290d5746abe1e579df6073782b6752a83 (diff)
downloadpfsense-ca5f5db15679683fddd2b0bf89c24cb1d031f2ff.zip
pfsense-ca5f5db15679683fddd2b0bf89c24cb1d031f2ff.tar.gz
Ticket #4418 make sure the dns_split is separated with spaces rather than space or comma to comply with strongswan requirements.
-rw-r--r--etc/inc/vpn.inc7
-rw-r--r--usr/local/www/vpn_ipsec_mobile.php2
2 files changed, 1 insertions, 8 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 3fb7694..0f966db 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -407,13 +407,6 @@ EOD;
$strongswan .= "\t\t\t# Search domain and default domain\n";
$strongswan .= "\t\t\t28674 = \"{$a_client['dns_domain']}\"\n";
if (empty($a_client['dns_split'])) {
- $ipsec_dns = explode(',', $a_client['dns_domain']);
- foreach ($ipsec_dns as $ipsecidx => $ipsecdns) {
- $ipsec_dns[$ipsecidx] = trim($ipsecdns);
- }
- $a_client['dns_domain'] = implode(' ', $ipsec_dns);
- unset($ipsec_dns);
-
$strongswan .= "\t\t\t28675 = \"{$a_client['dns_domain']}\"";
}
$strongswan .= "\n";
diff --git a/usr/local/www/vpn_ipsec_mobile.php b/usr/local/www/vpn_ipsec_mobile.php
index 98072d8..2b70809 100644
--- a/usr/local/www/vpn_ipsec_mobile.php
+++ b/usr/local/www/vpn_ipsec_mobile.php
@@ -146,7 +146,7 @@ if ($_POST['submit']) {
if ($pconfig['dns_split_enable']) {
if (!empty($pconfig['dns_split'])) {
- $domain_array=preg_split("/[ ,]+/",$pconfig['dns_split']);
+ $domain_array=explode(' ', $pconfig['dns_split']);
foreach ($domain_array as $curdomain) {
if (!is_domain($curdomain)) {
$input_errors[] = gettext("A valid split DNS domain list must be specified.");
OpenPOWER on IntegriCloud