diff mbox series

pktgen: Fix setting user pattern from cli

Message ID 20211130150218.10254-1-joshua.knight@netscout.com (mailing list archive)
State Not Applicable
Headers show
Series pktgen: Fix setting user pattern from cli | expand


Context Check Description
ci/iol-testing warning apply patch failure
ci/Intel-compilation warning apply issues
ci/checkpatch success coding style OK

Commit Message

Josh Knight Nov. 30, 2021, 3:02 p.m. UTC
When setting the user pattern from the pktgen cli, it would always be
incorrectly set to the string 'pattern' regardless of input.

This can be demonstrated simply by setting a pattern

    set 0 pattern user
    set 0 user pattern asdfasdf

Signed-off-by: Josh Knight <joshua.knight@netscout.com>
 app/cli-functions.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/app/cli-functions.c b/app/cli-functions.c
index 4293444..41d354b 100644
--- a/app/cli-functions.c
+++ b/app/cli-functions.c
@@ -652,7 +652,7 @@  set_cmd(int argc, char **argv)
 		case 25:
-				 pattern_set_user_pattern(info, argv[3]));
+				 pattern_set_user_pattern(info, argv[4]));
 		case 30:
 			p = strchr(argv[4], '/');