From: Damjan Marion Date: Wed, 7 Sep 2022 15:54:39 +0000 (+0200) Subject: fib: fix path copy function to deal with provided DPO in exclusive path X-Git-Tag: v23.02-rc0~29 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=a27aa6b413512415a592ecd1f14714fd1634d29c;p=vpp.git fib: fix path copy function to deal with provided DPO in exclusive path DPO in the new copy was not locked ... Type: fix Fixes: 0bfe5d8 Change-Id: I39f1368de459af91c4bb857d98a4b531bd5692a6 Signed-off-by: Damjan Marion --- diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c index e4ad8770449..db78587fb27 100644 --- a/src/vnet/fib/fib_path.c +++ b/src/vnet/fib/fib_path.c @@ -1507,6 +1507,12 @@ fib_path_copy (fib_node_index_t path_index, clib_memset(&path->fp_dpo, 0, sizeof(path->fp_dpo)); dpo_reset(&path->fp_dpo); + if (path->fp_type == FIB_PATH_TYPE_EXCLUSIVE) + { + clib_memset(&path->exclusive.fp_ex_dpo, 0, sizeof(dpo_id_t)); + dpo_copy(&path->exclusive.fp_ex_dpo, &orig_path->exclusive.fp_ex_dpo); + } + return (fib_path_get_index(path)); }