icmp: bug fix of buffer->error 45/18445/4
authorKingwel Xie <kingwel.xie@ericsson.com>
Thu, 21 Mar 2019 01:47:17 +0000 (21:47 -0400)
committerOle Trøan <otroan@employees.org>
Thu, 21 Mar 2019 11:29:24 +0000 (11:29 +0000)
commit27431dde9576e9c267af3d92b8f092467559e4e1
tree2c91022ad016e07d933e2cb6918d9e9edc9141c3
parent1ba5bc8d888d0164dd6e38857cbed09ab7ce1d8b
icmp: bug fix of buffer->error

Recent changes in icmp4/6 choose to free the original
buffer, and make a copy for sending icmp reply back.
However, buffer->error will be ignored when the buffer
is freed unconditionally.

A quick fix can be moving the counter increment code to icmp,
but I prefert to enqueue all buffers to 'error-drop' so that
they can be handled in a batch

rebase, using vlib_buffer_enqueue_to_single_next

Change-Id: I9f3028b55f1d5f634763e2410cd91e17f368195e
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
src/vnet/ip/icmp4.c
src/vnet/ip/icmp6.c