app/testpmd: fix sample action for RSS with no key
authorJiawei Wang <jiaweiw@nvidia.com>
Tue, 26 Jan 2021 03:49:42 +0000 (05:49 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 29 Jan 2021 17:16:11 +0000 (18:16 +0100)
commitb665487e0b3e0640b8c075a339c745acdf8ef2af
treeefd58465d7d195bbaa84f3361f616136b1626592
parent4e719bd52dc7bd808823119e1edbac942cd10576
app/testpmd: fix sample action for RSS with no key

When the RSS with null key was set in sample actions list, it
caused the segmentation fault since the RSS key pointer was
NULL while did the memory copy.

This patch adds the RSS key NULL pointer checking before copying
to fix the segmentation fault issue.

Fixes: 11b1b0eddade ("app/testpmd: support RSS in sample action")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
app/test-pmd/cmdline_flow.c