X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ffib%2Ffib_path.c;h=a6404805eb6b91432936c588c87765b431f98d06;hb=14053c9dbd75182f5302f7388d17508f3930f7ce;hp=ef5d58c9e2b8512bf0f24b7c9987555f639de1aa;hpb=cbe25aab3be72154f2c706c39eeba6a77f34450f;p=vpp.git diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c index ef5d58c9e2b..a6404805eb6 100644 --- a/src/vnet/fib/fib_path.c +++ b/src/vnet/fib/fib_path.c @@ -1488,7 +1488,7 @@ fib_path_copy (fib_node_index_t path_index, orig_path = fib_path_get(path_index); ASSERT(NULL != orig_path); - memcpy(path, orig_path, sizeof(*path)); + clib_memcpy(path, orig_path, sizeof(*path)); FIB_PATH_DBG(path, "create-copy:%d", path_index); @@ -1870,7 +1870,8 @@ fib_path_recursive_loop_detect (fib_node_index_t path_index, } case FIB_PATH_TYPE_ATTACHED_NEXT_HOP: case FIB_PATH_TYPE_ATTACHED: - if (adj_recursive_loop_detect(path->fp_dpo.dpoi_index, + if (dpo_is_adj(&path->fp_dpo) && + adj_recursive_loop_detect(path->fp_dpo.dpoi_index, entry_indicies)) { FIB_PATH_DBG(path, "recursive loop formed");