X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ffib%2Ffib_path_list.c;h=597a700a448d002bee5c9fa041597cecad1c915c;hb=a4e776642fe2d4572b6e604478182fa9b7e1fa2d;hp=7a9c328ce830498d6d2bc93971402e94d84636d4;hpb=57b5860f013953ce161d05302e05370db9cd6ee2;p=vpp.git diff --git a/src/vnet/fib/fib_path_list.c b/src/vnet/fib/fib_path_list.c index 7a9c328ce83..597a700a448 100644 --- a/src/vnet/fib/fib_path_list.c +++ b/src/vnet/fib/fib_path_list.c @@ -116,9 +116,7 @@ fib_path_list_get_node (fib_node_index_t index) static fib_path_list_t* fib_path_list_from_fib_node (fib_node_t *node) { -#if CLIB_DEBUG > 0 ASSERT(FIB_NODE_TYPE_PATH_LIST == node->fn_type); -#endif return ((fib_path_list_t*)node); } @@ -583,6 +581,11 @@ fib_path_list_get_n_paths (fib_node_index_t path_list_index) { fib_path_list_t *path_list; + if (FIB_NODE_INDEX_INVALID == path_list_index) + { + return (0); + } + path_list = fib_path_list_get(path_list_index); return (vec_len(path_list->fpl_paths)); @@ -611,7 +614,7 @@ fib_path_list_get_resolving_interface (fib_node_index_t path_list_index) return (sw_if_index); } -fib_protocol_t +dpo_proto_t fib_path_list_get_proto (fib_node_index_t path_list_index) { fib_path_list_t *path_list; @@ -753,7 +756,7 @@ fib_path_list_flags_2_path_flags (fib_path_list_flags_t plf) } fib_node_index_t -fib_path_list_create_special (fib_protocol_t nh_proto, +fib_path_list_create_special (dpo_proto_t nh_proto, fib_path_list_flags_t flags, const dpo_id_t *dpo) {