aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamjan Marion <dmarion@me.com>2022-09-07 17:54:39 +0200
committerOle Tr�an <otroan@employees.org>2022-09-09 16:12:29 +0000
commita27aa6b413512415a592ecd1f14714fd1634d29c (patch)
tree8782c5474d5801dedd1a598fc08ccf49b0930776 /src
parent9f5b36926b74109974e7c3ce9bb3a0a7d676c46c (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/fib/fib_path.c6
1 files changed, 6 insertions, 0 deletions
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));
}