summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/diag_ping.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-10-06 14:35:35 -0400
committerStephen Beaver <sbeaver@netgate.com>2015-10-06 14:35:35 -0400
commit214e79b0bd59f31996aefedc5d9490d08dad9111 (patch)
treee392d69e494a882a4a49141af163a0b54a8bbd75 /src/usr/local/www/diag_ping.php
parent12e15d0abfb4feb6783d269be790fd48165b3582 (diff)
downloadpfsense-214e79b0bd59f31996aefedc5d9490d08dad9111.zip
pfsense-214e79b0bd59f31996aefedc5d9490d08dad9111.tar.gz
Fixed #5267
Diffstat (limited to 'src/usr/local/www/diag_ping.php')
-rw-r--r--src/usr/local/www/diag_ping.php106
1 files changed, 49 insertions, 57 deletions
diff --git a/src/usr/local/www/diag_ping.php b/src/usr/local/www/diag_ping.php
index 125eebb..5a5275a 100644
--- a/src/usr/local/www/diag_ping.php
+++ b/src/usr/local/www/diag_ping.php
@@ -3,55 +3,55 @@
diag_ping.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2003-2005 Bob Zoller (bob@kludgebox.com) and Manuel Kasper <mk@neon1.net>
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2003-2005 Bob Zoller (bob@kludgebox.com) and Manuel Kasper <mk@neon1.net>
* part of m0n0wall (http://m0n0.ch/wall)
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * 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.
+ * 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.
+ * 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.
*
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgment:
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
- * 4. The names "pfSense" and "pfSense Project" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * coreteam@pfsense.org.
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
*
- * 5. Products derived from this software may not be called "pfSense"
- * nor may "pfSense" appear in their names without prior written
- * permission of the Electric Sheep Fencing, LLC.
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
*
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
*
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution (http://www.pfsense.org/).
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
*
- * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 pfSense PROJECT OR
- * ITS CONTRIBUTORS 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.
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED 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 pfSense PROJECT OR
+ * ITS CONTRIBUTORS 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.
*
- * ====================================================================
+ * ====================================================================
*
*/
@@ -75,10 +75,13 @@ define('MAX_COUNT', 10);
define('DEFAULT_COUNT', 3);
function create_sourceaddresslist() {
- $list = array('any' => 'Any');
+ $sourceips = get_possible_traffic_source_addresses(true);
- foreach (get_possible_traffic_source_addresses(true) as $sipname)
- $list[$sipname['value']] = $sipname['name'];
+ $list = array("" => 'Default');
+
+ foreach ($sourceips as $sipvalue => $sipname) {
+ $list[$sipvalue] = $sipname;
+ }
return $list;
}
@@ -176,23 +179,12 @@ $section->addInput(new Form_Input(
['placeholder' => 'Hostname to ping']
));
-$group = new Form_Group('IP Protocol');
-$group->add(new Form_Checkbox(
- 'ipproto',
- null,
- 'IPv4',
- ('ipv6' != $ipproto), # negative check, so this would be checked by default
- 'ipv4'
-))->displayAsRadio();
-$group->add(new Form_Checkbox(
+$section->addInput(new Form_Select(
'ipproto',
- null,
- 'IPv6',
- ('ipv6' == $ipproto),
- 'ipv6'
-))->displayAsRadio();
-$group->setHelp('Select the protocol to use');
-$section->add($group);
+ 'IP Protocol',
+ $ipproto,
+ ['ipv4' => 'IPv4', 'ipv6' => 'IPv6']
+));
$section->addInput(new Form_Select(
'sourceip',
OpenPOWER on IntegriCloud