summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-6lowpan.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--epan/dissectors/packet-6lowpan.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c
index 068b9a6e..b13cd08d 100644
--- a/epan/dissectors/packet-6lowpan.c
+++ b/epan/dissectors/packet-6lowpan.c
@@ -238,6 +238,7 @@ void proto_reg_handoff_6lowpan(void);
/* 6LoWPAN interface identifier length. */
#define LOWPAN_IFC_ID_LEN 8
+
/* Protocol fields handles. */
static int proto_6lowpan = -1;
static int hf_6lowpan_pattern = -1;
@@ -1858,6 +1859,7 @@ dissect_6lowpan_hc1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint dg
*---------------------------------------------------------------
*/
static tvbuff_t *
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_6lowpan_iphc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint dgram_size, const guint8 *siid, const guint8 *diid)
{
ieee802154_hints_t *hints;
@@ -2296,6 +2298,7 @@ dissect_6lowpan_iphc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint d
*---------------------------------------------------------------
*/
static struct lowpan_nhdr *
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_6lowpan_iphc_nhc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset, gint dgram_size, const guint8 *siid, const guint8 *diid)
{
gint length;
@@ -2326,7 +2329,10 @@ dissect_6lowpan_iphc_nhc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gi
offset += 1;
/* Decode the remainder of the packet using IPHC encoding. */
+ increment_dissection_depth(pinfo);
iphc_tvb = dissect_6lowpan_iphc(tvb_new_subset_remaining(tvb, offset), pinfo, tree, dgram_size, siid, diid);
+ decrement_dissection_depth(pinfo);
+
if (!iphc_tvb) return NULL;
/* Create the next header structure for the tunneled IPv6 header. */
@@ -2457,7 +2463,9 @@ dissect_6lowpan_iphc_nhc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gi
* There are more LOWPAN_NHC structures to parse. Call ourself again
* recursively to parse them and build the linked list.
*/
+ increment_dissection_depth(pinfo);
nhdr->next = dissect_6lowpan_iphc_nhc(tvb, pinfo, tree, offset, dgram_size - nhdr->reported, siid, diid);
+ decrement_dissection_depth(pinfo);
}
else if (ipv6_ext.ip6e_nxt != IP_PROTO_NONE) {
/* Create another next header structure for the remaining payload. */