app/testpmd: fix crash when port id out of bound
authorMichael Qiu <michael.qiu@intel.com>
Tue, 28 Jul 2015 18:32:15 +0000 (02:32 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 30 Jul 2015 00:15:32 +0000 (02:15 +0200)
commit78ef434ae2829f4bfb717784d1dc21a9bf1e663e
treee3d2e543069b05d44d9c86a5c00aa12944f6bdae
parent49e01d643759571b8da7f80d9de6ace974b25634
app/testpmd: fix crash when port id out of bound

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