aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip
diff options
context:
space:
mode:
authorJuraj Sloboda <jsloboda@cisco.com>2018-09-26 14:25:32 +0200
committerJuraj Sloboda <jsloboda@cisco.com>2018-10-02 09:00:09 +0000
commit8f39d55a298e08ac808da6988032f14d542627c6 (patch)
tree4079d1187ee9fe5428388ec88b5e61b9af6b4db7 /src/vnet/ip
parentef91534e665cf343af2389df11d46559a1f83d78 (diff)
Update code to compute checksum for buffer chains
Compute ICMP checksum for buffer chains Fix checksum function for buffer chains Change-Id: I39b845b94a63c3ab5fc9f6f9ab36cadbc67c104f Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Diffstat (limited to 'src/vnet/ip')
-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))