examples/ipsec-secgw: fix out-of-bound check
Coverity issue: 336791
Fixes: 7622291b64
("examples/ipsec-secgw: allow to specify neighbour MAC address")
Cc: stable@dpdk.org
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
This commit is contained in:
parent
728762e37e
commit
7831bcf026
@ -1439,7 +1439,7 @@ print_ethaddr(const char *name, const struct ether_addr *eth_addr)
|
||||
int
|
||||
add_dst_ethaddr(uint16_t port, const struct ether_addr *addr)
|
||||
{
|
||||
if (port > RTE_DIM(ethaddr_tbl))
|
||||
if (port >= RTE_DIM(ethaddr_tbl))
|
||||
return -EINVAL;
|
||||
|
||||
ethaddr_tbl[port].dst = ETHADDR_TO_UINT64(addr);
|
||||
|
Loading…
Reference in New Issue
Block a user