summaryrefslogtreecommitdiffstats
path: root/etc/inc/openvpn.inc
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2012-10-01 14:45:59 +0200
committerPiBa-NL <pba_2k3@yahoo.com>2012-10-01 14:45:59 +0200
commitda601f8e08b4569d15b59f1e8a113d337f03a9a0 (patch)
tree9162477f6656e93c2a86617c1ec8d95977e22ee2 /etc/inc/openvpn.inc
parentd8cdfd3e34fd57bfde7061620007a712321c4d12 (diff)
downloadpfsense-da601f8e08b4569d15b59f1e8a113d337f03a9a0.zip
pfsense-da601f8e08b4569d15b59f1e8a113d337f03a9a0.tar.gz
Allow for changing OpenVPN TUN to TAP device mode without reboot.
Diffstat (limited to 'etc/inc/openvpn.inc')
-rw-r--r--etc/inc/openvpn.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index bddb5c8..687c7ce 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -710,7 +710,12 @@ function openvpn_delete($mode, & $settings) {
$vpnid = $settings['vpnid'];
$mode_id = $mode.$vpnid;
- $tunname = "tun{$vpnid}";
+ if (isset($settings['dev_mode']))
+ $tunname = "{$settings['dev_mode']}{$vpnid}";
+ else { /* defaults to tun */
+ $tunname = "tun{$vpnid}";
+ }
+
if ($mode == "server")
$devname = "ovpns{$vpnid}";
else
OpenPOWER on IntegriCloud