summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/diag_packet_capture.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2016-12-27 18:04:37 -0500
committerjim-p <jimp@pfsense.org>2016-12-27 18:04:37 -0500
commit151b4e35eead8d1b1a9ccd1d1c3b3c4fb0e6620a (patch)
treecbc458c13f218976e0a7fa3dcac32089df105e0c /src/usr/local/www/diag_packet_capture.php
parent378574a350d01c634e055862a89f840142e4623d (diff)
downloadpfsense-151b4e35eead8d1b1a9ccd1d1c3b3c4fb0e6620a.zip
pfsense-151b4e35eead8d1b1a9ccd1d1c3b3c4fb0e6620a.tar.gz
Allow capturing based on MAC address as well.
Diffstat (limited to 'src/usr/local/www/diag_packet_capture.php')
-rwxr-xr-x[-rw-r--r--]src/usr/local/www/diag_packet_capture.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/usr/local/www/diag_packet_capture.php b/src/usr/local/www/diag_packet_capture.php
index 5b15ada..9295fe2 100644..100755
--- a/src/usr/local/www/diag_packet_capture.php
+++ b/src/usr/local/www/diag_packet_capture.php
@@ -72,6 +72,8 @@ function fixup_host($value, $position) {
return "{$andor}host {$not}" . $host;
} elseif (is_subnet($host)) {
return "{$andor}net {$not}" . $host;
+ } elseif (is_macaddr($host)) {
+ return "{$andor}ether host {$not}" . $host;
} else {
return "";
}
@@ -157,8 +159,8 @@ if ($_POST) {
}
foreach ($hosts as $h) {
- if (!is_subnet(strip_host_logic($h)) && !is_ipaddr(strip_host_logic($h))) {
- $input_errors[] = sprintf(gettext("A valid IP address or CIDR block must be specified. [%s]"), $h);
+ if (!is_subnet(strip_host_logic($h)) && !is_ipaddr(strip_host_logic($h)) && !is_macaddr(strip_host_logic($h))) {
+ $input_errors[] = sprintf(gettext("A valid IP address, CIDR block, or MAC address must be specified. [%s]"), $h);
}
}
}
OpenPOWER on IntegriCloud