summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vnet/fib/fib_path.c6
-rw-r--r--src/vnet/fib/fib_table.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c
index 226de2a1ddd..88dddbcaeea 100644
--- a/src/vnet/fib/fib_path.c
+++ b/src/vnet/fib/fib_path.c
@@ -879,6 +879,9 @@ fib_path_unresolve (fib_path_t *path)
fib_table_entry_special_remove(path->recursive.fp_tbl_id,
fib_entry_get_prefix(path->fp_via_fib),
FIB_SOURCE_RR);
+ fib_table_unlock(path->recursive.fp_tbl_id,
+ dpo_proto_to_fib(path->fp_nh_proto),
+ FIB_SOURCE_RR);
path->fp_via_fib = FIB_NODE_INDEX_INVALID;
}
break;
@@ -1897,6 +1900,9 @@ fib_path_resolve (fib_node_index_t path_index)
fib_prefix_from_ip46_addr(&path->recursive.fp_nh.fp_ip, &pfx);
}
+ fib_table_lock(path->recursive.fp_tbl_id,
+ dpo_proto_to_fib(path->fp_nh_proto),
+ FIB_SOURCE_RR);
fei = fib_table_entry_special_add(path->recursive.fp_tbl_id,
&pfx,
FIB_SOURCE_RR,
diff --git a/src/vnet/fib/fib_table.c b/src/vnet/fib/fib_table.c
index d8e8d63b9ae..47f2011b7aa 100644
--- a/src/vnet/fib/fib_table.c
+++ b/src/vnet/fib/fib_table.c
@@ -1269,6 +1269,9 @@ fib_table_lock (u32 fib_index,
fib_table_t *fib_table;
fib_table = fib_table_get(fib_index, proto);
+
+ ASSERT(fib_table->ft_locks[source] < (0xffff - 1));
+
fib_table->ft_locks[source]++;
fib_table->ft_locks[FIB_TABLE_TOTAL_LOCKS]++;
}