summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr/local/www/diag_packet_capture.php9
1 files changed, 1 insertions, 8 deletions
diff --git a/usr/local/www/diag_packet_capture.php b/usr/local/www/diag_packet_capture.php
index bb7ea91..64df956 100644
--- a/usr/local/www/diag_packet_capture.php
+++ b/usr/local/www/diag_packet_capture.php
@@ -83,14 +83,7 @@ if ($_POST) {
if ($fam !== "" && $fam !== "ip" && $fam !== "ip6") {
$input_errors[] = gettext("Invalid address family.");
}
- if ($proto !== "" &&
- $proto !== "icmp" &&
- $proto !== "icmp6" &&
- $proto !== "tcp" &&
- $proto !== "udp" &&
- $proto !== "arp" &&
- $proto !== "carp" &&
- $proto !== "esp") {
+ if ($proto !== "" && !in_array($proto, $protos)) {
$input_errors[] = gettext("Invalid protocol.");
}
OpenPOWER on IntegriCloud