From: Neale Ranns Date: Fri, 31 Aug 2018 07:11:19 +0000 (-0700) Subject: FIB path CLI fix for lookup-table IDs X-Git-Tag: v18.10-rc1~298 X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commitdiff_plain;h=4fa87e7b11785957a704d42318b557bdffc45e63 FIB path CLI fix for lookup-table IDs Change-Id: I8c127d472e0010036061a8a076599d1ff85abab5 Signed-off-by: Neale Ranns --- 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")) {