net/i40e: fix out-of-bounds access
When calling i40e_flowtype_to_pctype in i40e_get_hash_filter_global_config
and i40e_set_hash_filter_global_config, function i40e_flowtype_to_pctype
will be possibly make an out-of-bounds access, because size of the array
is 15. So check the flow type is valid before calling
i40e_flowtype_to_pctype.
In the process fix other occurances of the same problem
Coverity issue: 37793, 37794
Fixes:
782c8c92f13f ("i40e: add hash configuration")
Fixes:
f2b2e2354bbd ("i40e: split function for hash and flow director input")
Fixes:
98f055707685 ("i40e: configure input fields for RSS or flow director")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>