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:39 -0500 |
commit | d114f81bf8d93110aa59ed69378a5e09aedaaa1c (patch) | |
tree | 1c74604843c4a6b5e327fd65137ceac26d3fd6b3 /src/usr/local/www/diag_packet_capture.php | |
parent | 58b33af6330132485f4e010814f589a8923b5753 (diff) | |
download | pfsense-d114f81bf8d93110aa59ed69378a5e09aedaaa1c.zip pfsense-d114f81bf8d93110aa59ed69378a5e09aedaaa1c.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."); } |