OpenVPN export, defaults dev_mode to tun, for https://github.com/opnsense/core/issues/2787

This commit is contained in:
Ad Schellevis 2018-12-03 12:13:28 +01:00
parent 98247373d0
commit bb4bd9e87f

View File

@ -90,9 +90,8 @@ class PlainOpenVPN extends BaseExporter implements IExportProvider
protected function openvpnConfParts()
{
$conf = array();
if (isset($this->config['dev_mode'])) {
$conf[] = "dev {$this->config['dev_mode']}";
}
$conf[] = "dev " . (!empty($this->config['dev_mode']) ? $this->config['dev_mode'] : 'tun');
if (!empty($this->config['tunnel_networkv6'])) {
$conf[] .= "tun-ipv6";
}