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:
49e01d6
)
app/testpmd: fix crash when port id out of bound
author
Michael Qiu
<michael.qiu@intel.com>
Tue, 28 Jul 2015 18:32:15 +0000
(
02:32
+0800)
committer
Thomas Monjalon
<thomas.monjalon@6wind.com>
Thu, 30 Jul 2015 00:15:32 +0000
(
02:15
+0200)
In testpmd, when using "rx_vlan add 1 77", it will be a segment fault
Because the port ID should be less than 32.
Fixes:
edab33b1c01d
("app/testpmd: support port hotplug")
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
app/test-pmd/config.c
patch
|
blob
|
history
diff --git
a/app/test-pmd/config.c
b/app/test-pmd/config.c
index
1d29146
..
cf2aa6e
100644
(file)
--- a/
app/test-pmd/config.c
+++ b/
app/test-pmd/config.c
@@
-388,7
+388,7
@@
port_id_is_invalid(portid_t port_id, enum print_warning warning)
if (port_id == (portid_t)RTE_PORT_ALL)
return 0;
- if (ports[port_id].enabled)
+ if (port
_id < RTE_MAX_ETHPORTS && port
s[port_id].enabled)
return 0;
if (warning == ENABLED_WARN)