diff options
author | Dave Barach <dave@barachs.net> | 2019-09-09 16:38:17 -0400 |
---|---|---|
committer | Dave Barach <dave@barachs.net> | 2019-09-10 15:20:08 -0400 |
commit | 4b943d632864949310da4c88ea00e59f6043ae40 (patch) | |
tree | 0d88295ff7420659dcd25ad79a39dea1cc41c967 /src/vlib/main.c | |
parent | 1dafb7fd83b36640557be41e6aa2ea95e663c40b (diff) |
misc: clean up "pcap [rx|tx] trace" debug CLI
Separate debug CLI arg parsing from the underlying action
function. Fixes a number of subtle ordering dependencies, and will
allow us to add a binary API to control the feature at some point in
the future.
Type: refactor
Ticket: VPP-1770
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Id0dbeda06dad20e756c941c691e2088ce3c50ec7
(cherry picked from commit b97641c79f4aaf0069268c550f263167ddea2b34)
Diffstat (limited to 'src/vlib/main.c')
-rw-r--r-- | src/vlib/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vlib/main.c b/src/vlib/main.c index 1c6b9ba6329..2df935a5e17 100644 --- a/src/vlib/main.c +++ b/src/vlib/main.c @@ -2202,7 +2202,7 @@ vlib_pcap_dispatch_trace_configure (vlib_pcap_dispatch_trace_args_t * a) return -81; /* VNET_API_ERROR_VALUE_EXIST */ /* Change number of packets to capture while capturing */ - if (vm->dispatch_pcap_enable + if (vm->dispatch_pcap_enable && a->enable && (pm->n_packets_to_capture != a->packets_to_capture)) return -8; /* VNET_API_ERROR_INVALID_VALUE_2 */ |