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 <dmarion@me.com>
This commit is contained in:
Damjan Marion
2022-09-07 17:54:39 +02:00
committed by Ole Tr�an
parent 9f5b36926b
commit a27aa6b413

View File

@ -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));
}