net/nfp: fix out-of-bounds write for VXLAN
Fix the check logic of the index of the array, which
caused the out of bounds write problem.
Coverity issue: 381616
Fixes: c55abf6141
("net/nfp: support RSS on VXLAN inner layer")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
This commit is contained in:
parent
3c02593c9e
commit
98e675a4e9
@ -1386,7 +1386,7 @@ nfp_net_set_vxlan_port(struct nfp_net_hw *hw,
|
||||
int ret;
|
||||
uint32_t i;
|
||||
|
||||
if (idx > NFP_NET_N_VXLAN_PORTS) {
|
||||
if (idx >= NFP_NET_N_VXLAN_PORTS) {
|
||||
PMD_DRV_LOG(ERR, "The idx value is out of range.");
|
||||
return -ERANGE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user