summaryrefslogtreecommitdiffstats
path: root/etc/inc/openvpn.inc
diff options
context:
space:
mode:
authorDmitriy K. <levantin@mail.nnov.ru>2014-06-17 11:01:48 +0400
committerDmitriy K. <levantin@mail.nnov.ru>2014-06-17 11:01:48 +0400
commitb9e9903ddb21665023c9fcc241099476a42a9dbd (patch)
tree215266c4cd3f2e518dd8c7973d7941f1f4f2ad40 /etc/inc/openvpn.inc
parent7860191a10545a809673d4c8203c925156609da3 (diff)
downloadpfsense-b9e9903ddb21665023c9fcc241099476a42a9dbd.zip
pfsense-b9e9903ddb21665023c9fcc241099476a42a9dbd.tar.gz
patchpack1
-Fix #3401 (Added tun option "Disable IPv6" -Added new options: route-nopull, route-noexec, verb;
Diffstat (limited to 'etc/inc/openvpn.inc')
-rw-r--r--etc/inc/openvpn.inc38
1 files changed, 36 insertions, 2 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index 0591e56..4c23ed0 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -55,6 +55,22 @@ $openvpn_prots = array("UDP", "UDP6", "TCP", "TCP6");
global $openvpn_dev_mode;
$openvpn_dev_mode = array("tun", "tap");
+global $openvpn_verbosity_level;
+$openvpn_verbosity_level = array(
+ 0 => "none",
+ 1 => "default",
+ 2 => "2",
+ 3 => "3 (recommended)",
+ 4 => "4",
+ 5 => "5",
+ 6 => "6",
+ 7 => "7",
+ 8 => "8",
+ 9 => "9",
+ 10 => "10",
+ 11 => "11"
+);
+
/*
* The User Auth mode below is disabled because
* OpenVPN erroneously requires that we provide
@@ -460,11 +476,16 @@ function openvpn_reconfigure($mode, $settings) {
}
}
- $conf = "dev {$devname}\n";
+ $conf = "verb {$settings['verbosity_level']}\n";
+ $conf .= "dev {$devname}\n";
$conf .= "dev-type {$settings['dev_mode']}\n";
switch($settings['dev_mode']) {
case "tun":
- $conf .= "tun-ipv6\n";
+ if (!$settings['no_tun_ipv6']) {
+ $conf .= "tun-ipv6\n";
+ } else {
+
+ }
break;
}
$conf .= "dev-node /dev/{$tunname}\n";
@@ -768,6 +789,19 @@ function openvpn_reconfigure($mode, $settings) {
$conf .= "topology subnet\n";
}
+ // New client features
+ if ($mode == "client") {
+ // Dont pull routes checkbox
+ if ($settings['route_no_pull']) {
+ $conf .= "route-nopull\n";
+ }
+
+ // Dont add/remove routes checkbox
+ if ($settings['route_no_exec']) {
+ $conf .= "route-noexec\n";
+ }
+ }
+
openvpn_add_custom($settings, $conf);
openvpn_create_dirs();
OpenPOWER on IntegriCloud