diff options
author | Chris Buechler <cmb@pfsense.org> | 2016-04-20 23:40:11 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2016-04-20 23:40:11 -0500 |
commit | bf8b678722b930b6746c4a21d1b87021b43b1b8e (patch) | |
tree | 41e552bcbed883497bd7756433035f8440df25b3 /src/usr/local/www/diag_packet_capture.php | |
parent | c0358d44632b962a12a948e750dadcadb2d21997 (diff) | |
download | pfsense-bf8b678722b930b6746c4a21d1b87021b43b1b8e.zip pfsense-bf8b678722b930b6746c4a21d1b87021b43b1b8e.tar.gz |
Add validation of address family and protocol combinations. Ticket #6219
Diffstat (limited to 'src/usr/local/www/diag_packet_capture.php')
-rw-r--r-- | src/usr/local/www/diag_packet_capture.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/usr/local/www/diag_packet_capture.php b/src/usr/local/www/diag_packet_capture.php index d44a4e7..fa1b545 100644 --- a/src/usr/local/www/diag_packet_capture.php +++ b/src/usr/local/www/diag_packet_capture.php @@ -165,6 +165,18 @@ if ($_POST) { $input_errors[] = gettext("Invalid address family."); } + if ($fam !== "" && $proto !== "") { + if ($fam == "ip" && $proto == "icmp6") { + $input_errors[] = gettext("IPv4 with ICMPv6 is not valid."); + } + if ($fam == "ip6" && $proto == "icmp") { + $input_errors[] = gettext("IPv6 with ICMP is not valid."); + } + if ($fam == "ip6" && $proto =="arp") { + $input_errors[] = gettext("IPv6 with ARP is not valid."); + } + } + if ($proto !== "" && !in_array(strip_not($proto), $protos)) { $input_errors[] = gettext("Invalid protocol."); } |