X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvat%2Fapi_format.c;h=0a0198940cfcf72213823ac856676237a24dc33d;hb=22030434ac9a3a7296617b996268e79dbf8bbffa;hp=61b34973d6f5ddb6ddfc145f9daa58f7417a5f79;hpb=c01c4451c5c6285fbfb086fb46557234804f86ee;p=vpp.git diff --git a/src/vat/api_format.c b/src/vat/api_format.c index 61b34973d6f..0a0198940cf 100644 --- a/src/vat/api_format.c +++ b/src/vat/api_format.c @@ -8486,6 +8486,8 @@ api_ip_add_del_route (vat_main_t * vam) mpls_label_t next_hop_out_label = MPLS_LABEL_INVALID; mpls_label_t next_hop_via_label = MPLS_LABEL_INVALID; + memset (&v4_next_hop_address, 0, sizeof (ip4_address_t)); + memset (&v6_next_hop_address, 0, sizeof (ip6_address_t)); /* Parse args required to build the message */ while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { @@ -8518,6 +8520,16 @@ api_ip_add_del_route (vat_main_t * vam) { next_hop_set = 1; } + else + if (unformat + (i, "via %U", api_unformat_sw_if_index, vam, &sw_if_index)) + { + next_hop_set = 1; + } + else if (unformat (i, "via sw_if_index %d", &sw_if_index)) + { + next_hop_set = 1; + } else if (unformat (i, "resolve-attempts %d", &resolve_attempts)) ; else if (unformat (i, "weight %d", &next_hop_weight)) @@ -23509,8 +23521,8 @@ _(sw_interface_slave_dump, \ _(ip_table_add_del, \ "table [ipv6] [add | del]\n") \ _(ip_add_del_route, \ - "/ via > [table-id ]\n" \ - "[ | sw_if_index ] [resolve-attempts ]\n" \ + "/ via <||sw_if_index |via-label >\n" \ + "[table-id ] [ | sw_if_index ] [resolve-attempts ]\n"\ "[weight ] [drop] [local] [classify ] [del]\n" \ "[multipath] [count ]") \ _(ip_mroute_add_del, \