From 4fa87e7b11785957a704d42318b557bdffc45e63 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Fri, 31 Aug 2018 00:11:19 -0700 Subject: [PATCH] FIB path CLI fix for lookup-table IDs Change-Id: I8c127d472e0010036061a8a076599d1ff85abab5 Signed-off-by: Neale Ranns --- src/vnet/fib/fib_types.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/vnet/fib/fib_types.c b/src/vnet/fib/fib_types.c index 0dda65e9327..a71f4194a18 100644 --- a/src/vnet/fib/fib_types.c +++ b/src/vnet/fib/fib_types.c @@ -527,6 +527,10 @@ unformat_fib_route_path (unformat_input_t * input, va_list * args) { rpath->frp_proto = DPO_PROTO_IP4; *payload_proto = DPO_PROTO_IP4; + fi = fib_table_find (FIB_PROTOCOL_IP4, rpath->frp_fib_index); + if (~0 == fi) + return 0; + rpath->frp_fib_index = fi; } else if (unformat (input, "ip6-lookup-in-table %d", @@ -534,6 +538,10 @@ unformat_fib_route_path (unformat_input_t * input, va_list * args) { rpath->frp_proto = DPO_PROTO_IP6; *payload_proto = DPO_PROTO_IP6; + fi = fib_table_find (FIB_PROTOCOL_IP6, rpath->frp_fib_index); + if (~0 == fi) + return 0; + rpath->frp_fib_index = fi; } else if (unformat (input, "mpls-lookup-in-table %d", @@ -541,6 +549,10 @@ unformat_fib_route_path (unformat_input_t * input, va_list * args) { rpath->frp_proto = DPO_PROTO_MPLS; *payload_proto = DPO_PROTO_MPLS; + fi = fib_table_find (FIB_PROTOCOL_MPLS, rpath->frp_fib_index); + if (~0 == fi) + return 0; + rpath->frp_fib_index = fi; } else if (unformat (input, "src-lookup")) { -- 2.16.6