aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2018-12-11 16:55:33 +0100
committerDave Barach <openvpp@barachs.net>2018-12-13 14:42:14 +0000
commit69db1a60846f3e7dea3e1f615c396c356a49532e (patch)
treec5ef57512ba627dca31ad0ac24dd1ff4d7db6a92 /src
parent2e7e6ae11f96bb7c92c94c332b4b4d3786157829 (diff)
fix vlib_buffer_chain_compress assert in debug
replace vlib_buffer_advance with its code to work around assert Change-Id: I6e332527f5e0c10d23305b6fc2e837d8b4f99e78 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vlib/buffer_funcs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vlib/buffer_funcs.h b/src/vlib/buffer_funcs.h
index e8ccc86f1a9..c201fd672a5 100644
--- a/src/vlib/buffer_funcs.h
+++ b/src/vlib/buffer_funcs.h
@@ -1244,7 +1244,8 @@ vlib_buffer_chain_compress (vlib_main_t * vm,
first->current_length,
vlib_buffer_get_current (second), amount_to_copy);
first->current_length += amount_to_copy;
- vlib_buffer_advance (second, amount_to_copy);
+ second->current_data += amount_to_copy;
+ second->current_length -= amount_to_copy;
if (first->flags & VLIB_BUFFER_TOTAL_LENGTH_VALID)
{
first->total_length_not_including_first_buffer -= amount_to_copy;