- else if (reass)
- {
- u32 handoff_thread_idx;
- u32 counter = ~0;
- switch (ip4_full_reass_update
- (vm, node, rm, rt, reass, &bi0, &next0,
- &error0, CUSTOM == type, &handoff_thread_idx))
- {
- case IP4_REASS_RC_OK:
- /* nothing to do here */
- break;
- case IP4_REASS_RC_HANDOFF:
- next0 = IP4_FULL_REASS_NEXT_HANDOFF;
- b0 = vlib_get_buffer (vm, bi0);
- vnet_buffer (b0)->ip.reass.owner_thread_index =
- handoff_thread_idx;
- break;
- case IP4_REASS_RC_TOO_MANY_FRAGMENTS:
- counter = IP4_ERROR_REASS_FRAGMENT_CHAIN_TOO_LONG;
- break;
- case IP4_REASS_RC_NO_BUF:
- counter = IP4_ERROR_REASS_NO_BUF;
- break;
- case IP4_REASS_RC_INTERNAL_ERROR:
- counter = IP4_ERROR_REASS_INTERNAL_ERROR;
- /* Sanitization is needed in internal error cases only, as
- * the incoming packet is already dropped in other cases,
- * also adding bi0 back to the reassembly list, fixes the
- * leaking of buffers during internal errors.
- *
- * Also it doesnt make sense to send these buffers custom
- * app, these fragments are with internal errors */
- sanitize_reass_buffers_add_missing (vm, reass, &bi0);
- reass->error_next_index = ~0;
- break;
- }