diff options
author | Mauro Sardara <msardara@cisco.com> | 2023-01-20 18:19:03 +0000 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2023-01-20 18:27:25 +0000 |
commit | 64fa723904d35eda3406058469b890a39c3f628c (patch) | |
tree | bc71507dcd69c0be8bb850fc6c724fb81885e3b8 /hicn-plugin/src/pcs.h | |
parent | 3e5e7e22f80bd64b51d3182339c77eccb5109c2e (diff) |
fix(hicn-plugin): handle inflight interest coming from deleted face
Ticket: HICN-830
Change-Id: I14ed32bba2b07575ee604850080309706eb8ce85
Signed-off-by: Mauro Sardara <msardara@cisco.com>
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 */ |