Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
6d39c1e
)
session: avoid trying to send incomplete dgram
86/37886/3
author
Florin Coras
<
[email protected]
>
Tue, 10 Jan 2023 00:00:10 +0000
(16:00 -0800)
committer
Dave Barach
<
[email protected]
>
Tue, 10 Jan 2023 02:49:29 +0000
(
02:49
+0000)
Type: fix
Signed-off-by: Florin Coras <
[email protected]
>
Signed-off-by: Steven Luong <
[email protected]
>
Change-Id: Ibebe9e4ab7331c3ae66c9502e910368acaba51ec
src/vnet/session/session_node.c
patch
|
blob
|
history
diff --git
a/src/vnet/session/session_node.c
b/src/vnet/session/session_node.c
index
f819ee6
..
fd57f08
100644
(file)
--- a/
src/vnet/session/session_node.c
+++ b/
src/vnet/session/session_node.c
@@
-1253,8
+1253,9
@@
session_tx_set_dequeue_params (vlib_main_t * vm, session_tx_context_t * ctx,
(u8 *) & hdr);
ASSERT (hdr.data_length > hdr.data_offset);
dgram_len = hdr.data_length - hdr.data_offset;
- if (len + dgram_len > ctx->max_dequeue
- || first_dgram_len != dgram_len)
+ if (offset + sizeof (hdr) + hdr.data_length >
+ ctx->max_dequeue ||
+ first_dgram_len != dgram_len)
break;
len += dgram_len;
offset += sizeof (hdr) + hdr.data_length;