mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Ticket #4418 make sure the dns_split is separated with spaces rather than space or comma to comply with strongswan requirements.
This commit is contained in:
parent
82e6fde290
commit
ca5f5db156
@ -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";
|
||||
|
||||
@ -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.");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user