diff options
author | luoyaozu <luoyaozu@foxmail.com> | 2022-09-02 20:32:13 +0800 |
---|---|---|
committer | Matthew Smith <mgsmith@netgate.com> | 2022-09-06 19:31:15 +0000 |
commit | 5085d8a9456f4a75fcb8b7d263202e6ac3a7a441 (patch) | |
tree | fd929c2b64ce554d9d53148f0216d7859696b067 /src | |
parent | edb0d4563c2e808a1c7d9101b2c05087ffb3b279 (diff) |
vrrp: fix cli functions according to short_help
test output before fix:
DBGvpp# vrrp proto start sw_if_index 1 vr_id 1
vrrp proto: unknown input `sw_if_index 1 vr_id 1'
DBGvpp# vrrp vr track-if add sw_if_index 1 vr_id 1 track-index 1
priority 30
vrrp vr track-if: Please specify an interface
Type: fix
Signed-off-by: luoyaozu <luoyaozu@foxmail.com>
Change-Id: Ib8ba67e920b23008d9246318ec8f8f17bf0bea95
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/vrrp/vrrp_cli.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/vrrp/vrrp_cli.c b/src/plugins/vrrp/vrrp_cli.c index 437b896839c..4496bbb7333 100644 --- a/src/plugins/vrrp/vrrp_cli.c +++ b/src/plugins/vrrp/vrrp_cli.c @@ -242,6 +242,8 @@ vrrp_proto_start_stop_command_fn (vlib_main_t * vm, if (unformat (input, "%U", unformat_vnet_sw_interface, vmp->vnet_main, &sw_if_index)) ; + else if (unformat (input, "sw_if_index %u", &sw_if_index)) + ; else if (unformat (input, "vr_id %u", &vr_id)) ; else if (unformat (input, "ipv6")) @@ -311,6 +313,8 @@ vrrp_peers_command_fn (vlib_main_t * vm, unformat_input_t * input, if (unformat (input, "%U", unformat_vnet_sw_interface, vmp->vnet_main, &sw_if_index)) ; + else if (unformat (input, "sw_if_index %u", &sw_if_index)) + ; else if (unformat (input, "vr_id %u", &vr_id)) ; else if (unformat (input, "ipv6")) @@ -418,6 +422,8 @@ vrrp_vr_track_if_command_fn (vlib_main_t * vm, if (unformat (input, "%U", unformat_vnet_sw_interface, vmp->vnet_main, &sw_if_index)) ; + else if (unformat (input, "sw_if_index %u", &sw_if_index)) + ; else if (unformat (input, "add")) is_add = 1; else if (unformat (input, "del")) |