diff options
author | Mauro Sardara <msardara@cisco.com> | 2023-01-20 18:43:11 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2023-01-20 18:43:11 +0000 |
commit | f8a9c5b1a768ba01cff6738176b4ff7d5a5017bd (patch) | |
tree | 7d77bcf5df5a563c1da6bc389a7551769a202fbb /hicn-plugin/src/pcs.h | |
parent | da0d60997bce1e40cc0b1c7b7f4f58df56bbead3 (diff) | |
parent | 64fa723904d35eda3406058469b890a39c3f628c (diff) |
Merge "fix(hicn-plugin): handle inflight interest coming from deleted face" into stable/2210
Diffstat (limited to 'hicn-plugin/src/pcs.h')
-rw-r--r-- | hicn-plugin/src/pcs.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hicn-plugin/src/pcs.h b/hicn-plugin/src/pcs.h index 0b7635100..86fb72cc9 100644 --- a/hicn-plugin/src/pcs.h +++ b/hicn-plugin/src/pcs.h @@ -377,6 +377,16 @@ hicn_pcs_entry_get_entry_from_index (const hicn_pit_cs_t *pitcs, u32 index) return pool_elt_at_index (pitcs->pcs_entries_pool, index); } +always_inline hicn_pcs_entry_t * +hicn_pcs_entry_get_entry_from_index_safe (const hicn_pit_cs_t *pitcs, + u32 index) +{ + if (!pool_is_free_index (pitcs->pcs_entries_pool, index)) + return pool_elt_at_index (pitcs->pcs_entries_pool, index); + + return NULL; +} + /* * Check if pcs entry is a content store entry */ |