diff options
author | John Thacker <johnthacker@gmail.com> | 2022-11-12 10:23:01 -0500 |
---|---|---|
committer | John Thacker <johnthacker@gmail.com> | 2022-11-14 01:18:11 +0000 |
commit | 4f3b028d941d7270710841f19800c33301baf18e (patch) | |
tree | 13ba8ec9882845aee1510eb22da2db797505802b /plugins/epan | |
parent | 0bfdd0d954f0ad3ab57af99d09f3dee55f4cf851 (diff) |
epan: Separate fragment_head and fragment_item
Separate fragment_head and fragment_item into two
different types of structs.
Remove "offset" from fragment_head, which was unused,
making fragment heads 4 bytes smaller.
Remove fragment_nr_offset, datalen, reassembled_in,
reas_in_layer_num, and error from fragment_item,
making them 24 bytes smaller.
Change a few dissectors which were using fragment_head
and fragment_item indistinguishably.
Ping #17311
Diffstat (limited to 'plugins/epan')
-rw-r--r-- | plugins/epan/opcua/opcua.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/epan/opcua/opcua.c b/plugins/epan/opcua/opcua.c index b5d2d1b138..2eb3884f5b 100644 --- a/plugins/epan/opcua/opcua.c +++ b/plugins/epan/opcua/opcua.c @@ -226,6 +226,7 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree * guint32 opcua_num = 0; guint32 opcua_seqnum = 0; fragment_head *frag_msg = NULL; + fragment_item *frag_i = NULL; offset = 3; @@ -281,8 +282,8 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree * arbitrary value, so we have to fake the numbers in the stored fragments. this way Wireshark reassembles the message, as it expects the fragment sequence numbers to start at 0 */ - while (frag_msg->next) {frag_msg = frag_msg->next;} - opcua_seqnum = frag_msg->offset + 1; + for (frag_i = frag_msg->next; frag_i; frag_i = frag_i->next) {} + opcua_seqnum = frag_i->offset + 1; if (chunkType == 'F') { |