From 82e6fde290d5746abe1e579df6073782b6752a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20LU=C3=87I?= Date: Wed, 25 Feb 2015 16:16:02 +0100 Subject: Ticket #4418 Make the DNS names attr 28675 space separated as identified by Jeffrey Dvornek --- etc/inc/vpn.inc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'etc/inc/vpn.inc') diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index dc12a8d..3fb7694 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -406,12 +406,27 @@ EOD; if (!empty($a_client['dns_domain'])) { $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'])) + 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"; } if (!empty($a_client['dns_split'])) { + $ipsec_dns = explode(',', $a_client['dns_split']); + foreach ($ipsec_dns as $ipsecidx => $ipsecdns) { + $ipsec_dns[$ipsecidx] = trim($ipsecdns); + } + $a_client['dns_split'] = implode(' ', $ipsec_dns); + unset($ipsec_dns); + $strongswan .= "\t\t\t28675 = \"{$a_client['dns_split']}\"\n"; } -- cgit v1.1