summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/vpn_openvpn_client.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2017-05-10 15:54:56 -0400
committerjim-p <jimp@pfsense.org>2017-05-10 15:55:51 -0400
commit7618a842d54eade58007ab72c751b1f1a900f840 (patch)
tree4b243e6e32b05b4bfa8a7ef99960d224a12c92e0 /src/usr/local/www/vpn_openvpn_client.php
parent12d2dedf13bde4e36c329da8625be8499bd68a66 (diff)
downloadpfsense-7618a842d54eade58007ab72c751b1f1a900f840.zip
pfsense-7618a842d54eade58007ab72c751b1f1a900f840.tar.gz
Add OpenVPN GUI Option for "sndbuf" and "rcvbuf", using the same value for both. Fixes #7507
Diffstat (limited to 'src/usr/local/www/vpn_openvpn_client.php')
-rw-r--r--src/usr/local/www/vpn_openvpn_client.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/usr/local/www/vpn_openvpn_client.php b/src/usr/local/www/vpn_openvpn_client.php
index 4b566a9..f0c612c 100644
--- a/src/usr/local/www/vpn_openvpn_client.php
+++ b/src/usr/local/www/vpn_openvpn_client.php
@@ -164,6 +164,7 @@ if ($act == "edit") {
$pconfig['compression'] = $a_client[$id]['compression'];
$pconfig['passtos'] = $a_client[$id]['passtos'];
$pconfig['udp_fast_io'] = $a_client[$id]['udp_fast_io'];
+ $pconfig['sndrcvbuf'] = $a_client[$id]['sndrcvbuf'];
$pconfig['topology'] = $a_client[$id]['topology'];
// just in case the modes switch
@@ -360,6 +361,10 @@ if ($_POST['save']) {
}
}
+ if (!empty($pconfig['sndrcvbuf']) && !array_key_exists($pconfig['sndrcvbuf'], openvpn_get_buffer_values())) {
+ $input_errors[] = gettext("The supplied Send/Receive Buffer size is invalid.");
+ }
+
if (!$input_errors) {
$client = array();
@@ -434,6 +439,7 @@ if ($_POST['save']) {
$client['compression'] = $pconfig['compression'];
$client['passtos'] = $pconfig['passtos'];
$client['udp_fast_io'] = $pconfig['udp_fast_io'];
+ $client['sndrcvbuf'] = $pconfig['sndrcvbuf'];
$client['route_no_pull'] = $pconfig['route_no_pull'];
$client['route_no_exec'] = $pconfig['route_no_exec'];
@@ -893,6 +899,16 @@ if ($act=="new" || $act=="edit"):
'Not compatible with all platforms, and not compatible with OpenVPN bandwidth limiting.');
$section->addInput(new Form_Select(
+ 'sndrcvbuf',
+ 'Send/Receive Buffer',
+ $pconfig['sndrcvbuf'],
+ openvpn_get_buffer_values()
+ ))->setHelp('Configure a Send and Receive Buffer size for OpenVPN. ' .
+ 'The default buffer size can be too small in many cases, depending on hardware and network uplink speeds. ' .
+ 'Finding the best buffer size can take some experimentation. To test the best value for a site, start at ' .
+ '512KiB and test higher and lower values.');
+
+ $section->addInput(new Form_Select(
'verbosity_level',
'Verbosity level',
$pconfig['verbosity_level'],
OpenPOWER on IntegriCloud