diff options
author | Neale Ranns <nranns@cisco.com> | 2016-12-12 19:35:58 +0000 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2016-12-14 12:25:23 +0000 |
commit | 8c2f05c2dc5d87f64ce03916d1b8341ec0397b15 (patch) | |
tree | 69612a9d9fea450e5ff917c25a208e44002c0e15 /vnet | |
parent | 9f9d07b801e2e82dcfc7c06527e11f593d6a9f9a (diff) |
IP and MPLS route debug CLI fixes
Change-Id: I1b61f36c88308c1bcf9a61a87843d1fea457d8fe
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'vnet')
-rw-r--r-- | vnet/vnet/ip/lookup.c | 9 | ||||
-rw-r--r-- | vnet/vnet/mpls/mpls.c | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/vnet/vnet/ip/lookup.c b/vnet/vnet/ip/lookup.c index 126deef7dd0..734a4cd7cfb 100644 --- a/vnet/vnet/ip/lookup.c +++ b/vnet/vnet/ip/lookup.c @@ -544,6 +544,15 @@ vnet_ip_route_cmd (vlib_main_t * vm, } else if (vec_len (prefixs) > 0 && unformat (line_input, "via %U", + unformat_vnet_sw_interface, vnm, + &rpath.frp_sw_if_index)) + { + rpath.frp_weight = 1; + rpath.frp_proto = prefixs[0].fp_proto; + vec_add1 (rpaths, rpath); + } + else if (vec_len (prefixs) > 0 && + unformat (line_input, "via %U", unformat_dpo, &dpo, prefixs[0].fp_proto)) { vec_add1 (dpos, dpo); diff --git a/vnet/vnet/mpls/mpls.c b/vnet/vnet/mpls/mpls.c index e6ae4980067..c3e642a649c 100644 --- a/vnet/vnet/mpls/mpls.c +++ b/vnet/vnet/mpls/mpls.c @@ -418,7 +418,7 @@ vnet_mpls_local_label (vlib_main_t * vm, pfx.fp_proto = FIB_PROTOCOL_MPLS; pfx.fp_len = 21; pfx.fp_label = local_label; - pfx.fp_payload_proto = DPO_PROTO_MPLS; + pfx.fp_payload_proto = fib_proto_to_dpo(rpaths[0].frp_proto); if (NULL == rpaths) { @@ -437,7 +437,7 @@ vnet_mpls_local_label (vlib_main_t * vm, if (~0 == fi) { error = clib_error_return(0 , "%U Via table %d does not exist", - format_fib_protocol, pfx.fp_payload_proto, + format_dpo_proto, pfx.fp_payload_proto, rpaths[0].frp_fib_index); goto done; } |