diff options
author | Clement Durand <clement.durand@polytechnique.edu> | 2017-04-12 16:33:55 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2017-04-13 21:41:46 +0000 |
commit | 0f7d2ff58a63fdc671c1c0954ffe7c6ff0501daa (patch) | |
tree | 167be359a31731d8a0ae5a86e672f2a7c512b563 /src/vnet | |
parent | a0558307187ef2317f31e3e876a1a5e1faa2541c (diff) |
tcp builtin_client: bug correction and short_help
The missing call to `vnet_session_enable_disable' would cause segfaults
because of an uninitialized session pointer. Just as in the builtin
server the session needs to be enabled for the client.
The `short_help' of the CLI command was also populated with the
arguments that are accepted in the parsing function
`test_tcp_clients_command_fn'.
Change-Id: I88c16efa80597dd19b406e8cf1c87aec1ec73573
Signed-off-by: Clement Durand <clement.durand@polytechnique.edu>
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/tcp/builtin_client.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/tcp/builtin_client.c b/src/vnet/tcp/builtin_client.c index c1567aa09c8..9e8e156107b 100644 --- a/src/vnet/tcp/builtin_client.c +++ b/src/vnet/tcp/builtin_client.c @@ -419,6 +419,7 @@ test_tcp_clients_command_fn (vlib_main_t * vm, } } #endif + vnet_session_enable_disable (vm, 1 /* turn on TCP, etc. */ ); /* Fire off connect requests, in something approaching a normal manner */ for (i = 0; i < n_clients; i++) @@ -455,7 +456,7 @@ VLIB_REGISTER_THREAD (builtin_client_reg, static) = { VLIB_CLI_COMMAND (test_clients_command, static) = { .path = "test tcp clients", - .short_help = "test tcp clients", + .short_help = "test tcp clients [nclients %d] [iterations %d] [bytes %d] [uri tcp://1.2.3.4/1234]", .function = test_tcp_clients_command_fn, }; /* *INDENT-ON* */ |