aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip/ip.h')
-rw-r--r--src/vnet/ip/ip.h2
1 files changed, 1 insertions, 1 deletions
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))