summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorlgcosta <lgcosta@pfsense.org>2011-03-21 15:56:43 -0300
committerlgcosta <lgcosta@pfsense.org>2011-03-21 15:58:43 -0300
commitbf87b4d7d1e9c0064e59727afd7601c111f6f3da (patch)
tree720113787285c71bc19ae2be9171b580325be107 /etc
parent375828d911b37e0e63a5e2530f8e8d88ee79e8e1 (diff)
downloadpfsense-bf87b4d7d1e9c0064e59727afd7601c111f6f3da.zip
pfsense-bf87b4d7d1e9c0064e59727afd7601c111f6f3da.tar.gz
Added option to select the type of device for use in the tunnel openvpn
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/openvpn.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index 08e5f92..8d71fd2 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -295,11 +295,11 @@ function openvpn_reconfigure($mode, $settings) {
$vpnid = $settings['vpnid'];
$mode_id = $mode.$vpnid;
- if (isset($settings['dev_mode']))
- $tunname = "{$settings['dev_mode']}{$vpnid}";
+ if (isset($settings['device_mode']))
+ $tunname = "{$settings['device_mode']}{$vpnid}";
else { /* defaults to tun */
$tunname = "tun{$vpnid}";
- $settings['dev_mode'] = "tun";
+ $settings['device_mode'] = "tun";
}
if ($mode == "server")
@@ -323,6 +323,7 @@ function openvpn_reconfigure($mode, $settings) {
$pfile = $g['varrun_path'] . "/openvpn_{$mode_id}.pid";
$proto = ($settings['protocol'] == 'UDP' ? 'udp' : "tcp-{$mode}");
+ $device_mode = $settings['device_mode'];
$cipher = $settings['crypto'];
$interface = $settings['interface'];
@@ -340,7 +341,7 @@ function openvpn_reconfigure($mode, $settings) {
}
$conf = "dev {$devname}\n";
- $conf .= "dev-type {$settings['dev_mode']}\n";
+ $conf .= "dev-type {$settings['device_mode']}\n";
$conf .= "dev-node /dev/{$tunname}\n";
$conf .= "writepid {$pfile}\n";
$conf .= "#user nobody\n";
OpenPOWER on IntegriCloud