summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/fib_path.c
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-09-10 19:14:07 -0700
committerDamjan Marion <dmarion@me.com>2018-09-25 19:47:53 +0000
commit6fff24aaf84a4349faf04dc39bd1889f42ad4609 (patch)
tree7ac8634d5ca4583687ec6fc2d93b859f0de35089 /src/vnet/fib/fib_path.c
parentb474380f82b75d9640f9bf6ee78c891a6794dbfb (diff)
FIB: recusrive paths must lock the table to prevent its deletion
Change-Id: I958bf057be751dc7b3a0d93080021b3addc405b7 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vnet/fib/fib_path.c')
-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 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,