diff options
author | Vijayabhaskar Katamreddy <vkatamre@cisco.com> | 2022-05-19 17:07:22 +0000 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2022-05-23 09:40:18 +0000 |
commit | beafecfc2e183d8b4036894e345847ad1ab351a9 (patch) | |
tree | 41425baf8388379a00e0a567fa882fb37e26805c /src/vnet | |
parent | bc8c210f1de89d2b29c36c421cb98e8f16138f1c (diff) |
ip: reassembly - fixing stepping index in a better way
Type: fix
pool_is_free_index() check is performed only for the first element
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Change-Id: Icadc715a9b54761ec69805a134a69a262137536d
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/ip/reass/ip4_full_reass.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/vnet/ip/reass/ip4_full_reass.c b/src/vnet/ip/reass/ip4_full_reass.c index 1ac22615a60..becfc460450 100644 --- a/src/vnet/ip/reass/ip4_full_reass.c +++ b/src/vnet/ip/reass/ip4_full_reass.c @@ -1724,14 +1724,14 @@ ip4_full_reass_walk_expired (vlib_main_t *vm, vlib_node_runtime_t *node, rt->last_id = end; } - pool_foreach_stepping_index ( - index, beg, end, rt->pool, ({ - reass = pool_elt_at_index (rt->pool, index); - if (now > reass->last_heard + rm->timeout) - { - vec_add1 (pool_indexes_to_free, index); - } - })); + pool_foreach_stepping_index (index, beg, end, rt->pool) + { + reass = pool_elt_at_index (rt->pool, index); + if (now > reass->last_heard + rm->timeout) + { + vec_add1 (pool_indexes_to_free, index); + } + } if (vec_len (pool_indexes_to_free)) vlib_node_increment_counter (vm, node->node_index, |