X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip.h;h=b114fcbaaf66af4987383f670ff547303e97955e;hb=8f39d55a298e08ac808da6988032f14d542627c6;hp=50965d411e6067bcf14fd3eb48e54a7d7fcd9027;hpb=ef91534e665cf343af2389df11d46559a1f83d78;p=vpp.git diff --git a/src/vnet/ip/ip.h b/src/vnet/ip/ip.h index 50965d411e6..b114fcbaaf6 100644 --- a/src/vnet/ip/ip.h +++ b/src/vnet/ip/ip.h @@ -162,7 +162,7 @@ ip_incremental_checksum_buffer (vlib_main_t * vm, void *h; u32 n; - n = clib_min (n_bytes_left, b->current_length); + n = clib_min (n_bytes_left, b->current_length - first_buffer_offset); h = vlib_buffer_get_current (b) + first_buffer_offset; sum = ip_incremental_checksum (sum, h, n); if (PREDICT_FALSE (b->flags & VLIB_BUFFER_NEXT_PRESENT))