summaryrefslogtreecommitdiffstats
path: root/src/vnet/buffer.h
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2021-11-03 17:57:28 +0100
committerOle Tr�an <otroan@employees.org>2021-11-04 13:17:50 +0000
commit5a58e7c546239da5c500611d60cf4e7635f138c5 (patch)
tree40b3204b7807537ca35d59e439b6245ba012556d /src/vnet/buffer.h
parentb5a2b05327c1a2bbb23dbb7131cc1be6c0db5e67 (diff)
ip: reassembly: avoid reading truncated L4 headers
Check if L4 headers are truncated and if so, set a flag for (future) consumers instead of reading/writing garbage data. Type: fix Fixes: de34c35fc73226943538149fae9dbc5cfbdc6e75 Change-Id: I0b656ec103a11c356b98a6f36cad98536a78d1dc Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/vnet/buffer.h')
-rw-r--r--src/vnet/buffer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/buffer.h b/src/vnet/buffer.h
index 09abedd5e74..594c6083b84 100644
--- a/src/vnet/buffer.h
+++ b/src/vnet/buffer.h
@@ -244,7 +244,8 @@ typedef struct
u8 save_rewrite_length;
u8 ip_proto; /* protocol in ip header */
u8 icmp_type_or_tcp_flags;
- u8 is_non_first_fragment;
+ u8 is_non_first_fragment : 1;
+ u8 l4_layer_truncated : 7;
u32 tcp_seq_number;
};
/* full reassembly output variables */