git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cddfcb
)
net/ixgbe: fix mirror rule index overflow
author
Qi Zhang
<qi.z.zhang@intel.com>
Fri, 21 Jul 2017 08:56:37 +0000
(16:56 +0800)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Mon, 31 Jul 2017 17:58:41 +0000
(19:58 +0200)
Mirror rule id should not exceed the boundary defined by
IXGBE_MAX_MIRROR_RULES.
Fixes:
fe3a45fd4104
("ixgbe: add VMDq support")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ixgbe/ixgbe_ethdev.c
patch
|
blob
|
history
diff --git
a/drivers/net/ixgbe/ixgbe_ethdev.c
b/drivers/net/ixgbe/ixgbe_ethdev.c
index
e436dca
..
5dc007f
100644
(file)
--- a/
drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/
drivers/net/ixgbe/ixgbe_ethdev.c
@@
-5461,6
+5461,9
@@
ixgbe_mirror_rule_reset(struct rte_eth_dev *dev, uint8_t rule_id)
if (ixgbe_vt_check(hw) < 0)
return -ENOTSUP;
+ if (rule_id >= IXGBE_MAX_MIRROR_RULES)
+ return -EINVAL;
+
memset(&mr_info->mr_conf[rule_id], 0,
sizeof(struct rte_eth_mirror_conf));