aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/netio/netio.priv.inc43
-rw-r--r--config/netio/netio.xml29
-rw-r--r--config/netio/netioserver.xml18
-rw-r--r--pkg_config.10.xml2
-rw-r--r--pkg_config.8.xml4
-rw-r--r--pkg_config.8.xml.amd644
6 files changed, 75 insertions, 25 deletions
diff --git a/config/netio/netio.priv.inc b/config/netio/netio.priv.inc
new file mode 100644
index 00000000..f07d33dc
--- /dev/null
+++ b/config/netio/netio.priv.inc
@@ -0,0 +1,43 @@
+<?php
+/*
+ netio.priv.inc
+ part of pfSense (http://www.pfSense.org/)
+ Copyright (C) 2015 ESF, LLC
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+global $priv_list;
+
+$priv_list['page-diagnostics-netio-client'] = array();
+$priv_list['page-diagnostics-netio-client']['name'] = "WebCfg - Diagnostics: netio client";
+$priv_list['page-diagnostics-netio-client']['descr'] = "Allow access to netio client GUI";
+$priv_list['page-diagnostics-netio-client']['match'] = array();
+$priv_list['page-diagnostics-netio-client']['match'][] = "pkg_edit.php?xml=netio.xml*";
+
+$priv_list['page-diagnostics-netio-server'] = array();
+$priv_list['page-diagnostics-netio-server']['name'] = "WebCfg - Diagnostics: netio server";
+$priv_list['page-diagnostics-netio-server']['descr'] = "Allow access to netio server GUI";
+$priv_list['page-diagnostics-netio-server']['match'] = array();
+$priv_list['page-diagnostics-netio-server']['match'][] = "pkg_edit.php?xml=netioserver.xml*";
+
+?>
diff --git a/config/netio/netio.xml b/config/netio/netio.xml
index 34f188c2..3bb079d8 100644
--- a/config/netio/netio.xml
+++ b/config/netio/netio.xml
@@ -42,16 +42,21 @@
]]>
</copyright>
<name>netio</name>
- <version>1.27</version>
- <title>netio: Client</title>
+ <version>1.28</version>
+ <title>Diagnostics: netio: Client</title>
+ <savetext>Run netio client</savetext>
<preoutput>yes</preoutput>
<donotsave>true</donotsave>
<menu>
<name>netio</name>
- <tooltiptext>Run netio in client or server mode.</tooltiptext>
<section>Diagnostics</section>
- <configfile>netio.xml</configfile>
+ <url>/pkg_edit.php?xml=netio.xml</url>
</menu>
+ <service>
+ <name>netio</name>
+ <executable>netio</executable>
+ <description>netio Network Throughput Benchmark Server/Client</description>
+ </service>
<tabs>
<tab>
<text>Client</text>
@@ -64,6 +69,11 @@
</tab>
</tabs>
<additional_files_needed>
+ <prefix>/etc/inc/priv/</prefix>
+ <item>https://packages.pfsense.org/packages/config/netio/netio.priv.inc</item>
+ </additional_files_needed>
+ <additional_files_needed>
+ <prefix>/usr/local/pkg/</prefix>
<item>https://packages.pfsense.org/packages/config/netio/netioserver.xml</item>
</additional_files_needed>
<fields>
@@ -78,16 +88,17 @@
<fieldname>port</fieldname>
<description>Enter the port that netio will connect to. (Default: 18767)</description>
<type>input</type>
+ <default_value>18767</default_value>
</field>
</fields>
<custom_add_php_command>
<![CDATA[
mwexec("/usr/bin/killall netio");
- $netio_options = "";
- if ($_POST['port'] != "") {
- $netio_options .= " -p {$_POST['port']}";
- $netio_options .= $_POST['hostname'];
- system("/usr/local/bin/netio " . $netio_options);
+ if ($_POST['port'] != "" && $_POST['hostname'] != "") {
+ $port = escapeshellarg($_POST['port']);
+ $hostname = escapeshellarg($_POST['hostname']);
+ $netio_options = "-p {$port} {$hostname}";
+ system("/usr/local/bin/netio {$netio_options}");
}
]]>
</custom_add_php_command>
diff --git a/config/netio/netioserver.xml b/config/netio/netioserver.xml
index da73e902..bbe32665 100644
--- a/config/netio/netioserver.xml
+++ b/config/netio/netioserver.xml
@@ -42,16 +42,11 @@
]]>
</copyright>
<name>netioserver</name>
- <version>1.27</version>
- <title>netio: Server</title>
+ <version>1.28</version>
+ <title>Diagnostics: netio: Server</title>
+ <savetext>Run netio server</savetext>
<preoutput>yes</preoutput>
<donotsave>true</donotsave>
- <menu>
- <name>netio</name>
- <tooltiptext>Run netio in client or server mode.</tooltiptext>
- <section>Diagnostics</section>
- <configfile>netio.xml</configfile>
- </menu>
<tabs>
<tab>
<text>Client</text>
@@ -69,14 +64,15 @@
<fieldname>port</fieldname>
<description>Enter the port that netio will bind to. (Default: 18767)</description>
<type>input</type>
+ <default_value>18767</default_value>
</field>
</fields>
<custom_add_php_command>
<![CDATA[
mwexec("/usr/bin/killall netio");
- if($_POST['port'] != "") {
- $netioserver_options = " -p {$_POST['port']}";
- system("/usr/local/bin/netio -s" . $netioserver_options);
+ if ($_POST['port'] != "") {
+ $port = escapeshellarg($_POST['port']);
+ system("/usr/local/bin/netio -s -p {$port}");
}
]]>
</custom_add_php_command>
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 1ad74e80..5bcb4c75 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -1028,7 +1028,7 @@
<category>Network Management</category>
<config_file>https://packages.pfsense.org/packages/config/netio/netio.xml</config_file>
<depends_on_package_pbi>netio-1.26-##ARCH##.pbi</depends_on_package_pbi>
- <version>1.27</version>
+ <version>1.28</version>
<required_version>2.2</required_version>
<status>ALPHA</status>
<configurationfile>netio.xml</configurationfile>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index cc1ece85..1b4c1870 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -1066,8 +1066,8 @@
<depends_on_package_base_url>https://files.pfsense.org/packages/8/All</depends_on_package_base_url>
<depends_on_package>netio-1.26.tbz</depends_on_package>
<depends_on_package_pbi>netio-1.26-i386.pbi</depends_on_package_pbi>
- <version>1.26</version>
- <required_version>2.0</required_version>
+ <version>1.28</version>
+ <required_version>2.1</required_version>
<status>ALPHA</status>
<configurationfile>netio.xml</configurationfile>
<build_port_path>/usr/ports/benchmarks/netio</build_port_path>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index d99edb50..1bfc2a27 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -1053,8 +1053,8 @@
<depends_on_package_base_url>https://files.pfsense.org/packages/amd64/8/All</depends_on_package_base_url>
<depends_on_package>netio-1.26.tbz</depends_on_package>
<depends_on_package_pbi>netio-1.26-amd64.pbi</depends_on_package_pbi>
- <version>1.26</version>
- <required_version>2.0</required_version>
+ <version>1.28</version>
+ <required_version>2.1</required_version>
<status>ALPHA</status>
<configurationfile>netio.xml</configurationfile>
<build_port_path>/usr/ports/benchmarks/netio</build_port_path>