summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-11-08 15:15:11 +0100
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-11-18 13:32:08 +0000
commit4cf238b9d70ea3f662f7cc969966b41ae08c8283 (patch)
tree3ecc449dd7c5bee42c1d509500b495d1a9b04d14 /src
parent8f6b9a39e63190639bfc19e162bfb63ccbf26871 (diff)
tap: fix cli parser
Type: fix Change-Id: I38ee9efd23774cce7790565825527cca9ba6f200 Signed-off-by: Damjan Marion <damarion@cisco.com> (cherry picked from commit 0ba86cb1bdcc273ebc3d5a92f765639a64894a7a)
Diffstat (limited to 'src')
-rw-r--r--src/vnet/devices/tap/cli.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/vnet/devices/tap/cli.c b/src/vnet/devices/tap/cli.c
index 5bf38a38659..42fa8d73f35 100644
--- a/src/vnet/devices/tap/cli.c
+++ b/src/vnet/devices/tap/cli.c
@@ -37,6 +37,7 @@ tap_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
unformat_input_t _line_input, *line_input = &_line_input;
tap_create_if_args_t args = { 0 };
int ip_addr_set = 0;
+ u32 tmp;
args.id = ~0;
args.tap_flags = 0;
@@ -73,10 +74,10 @@ tap_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
else if (unformat (line_input, "host-ip6-gw %U",
unformat_ip6_address, &args.host_ip6_gw))
args.host_ip6_gw_set = 1;
- else if (unformat (line_input, "rx-ring-size %d", &args.rx_ring_sz))
- ;
- else if (unformat (line_input, "tx-ring-size %d", &args.tx_ring_sz))
- ;
+ else if (unformat (line_input, "rx-ring-size %d", &tmp))
+ args.rx_ring_sz = tmp;
+ else if (unformat (line_input, "tx-ring-size %d", &tmp))
+ args.tx_ring_sz = tmp;
else
if (unformat
(line_input, "host-mtu-size %d", &args.host_mtu_size))