summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-11-09 19:03:09 -0800
committerFlorin Coras <florin.coras@gmail.com>2020-11-10 16:46:48 +0000
commitab0a87f32780a94f4d576bb9c5bef2715188d102 (patch)
treec8cab2f58d029f95d95498fb675700afaae2285c /src/vnet
parent448bc81d3696dad2a35bb42ec37e097f431b5566 (diff)
tcp: fix test for trailing bytes
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6455f2d38a2927f16fd4cb0e26b8560a2357cebe
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/tcp/tcp_input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c
index 0f7006a01fa..182062f1b42 100644
--- a/src/vnet/tcp/tcp_input.c
+++ b/src/vnet/tcp/tcp_input.c
@@ -1299,7 +1299,7 @@ tcp_segment_rcv (tcp_worker_ctx_t * wrk, tcp_connection_t * tc,
tc->data_segs_in += 1;
/* Make sure we don't consume trailing bytes */
- if (PREDICT_FALSE (b->current_length != n_data_bytes))
+ if (PREDICT_FALSE (b->current_length > n_data_bytes))
b->current_length = n_data_bytes;
/* Handle out-of-order data */