summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bgp.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 17:44:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 17:44:18 +0000
commit1da76b3706a6c9bd41bf8f219d7c97de5e1e5c7f (patch)
tree9930fb4bb87cd6037f60efff9656f967121c8c2d /epan/dissectors/packet-bgp.c
parentAdding debian version 4.2.2-1.1. (diff)
downloadwireshark-1da76b3706a6c9bd41bf8f219d7c97de5e1e5c7f.tar.xz
wireshark-1da76b3706a6c9bd41bf8f219d7c97de5e1e5c7f.zip
Merging upstream version 4.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-bgp.c')
-rw-r--r--epan/dissectors/packet-bgp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/epan/dissectors/packet-bgp.c b/epan/dissectors/packet-bgp.c
index 75d9fc9a..85142598 100644
--- a/epan/dissectors/packet-bgp.c
+++ b/epan/dissectors/packet-bgp.c
@@ -5327,6 +5327,7 @@ decode_link_state_attribute_flex_algo_subtlv(proto_tree *tree, tvbuff_t *tvb, gi
* Decode a multiprotocol prefix
*/
static int
+// NOLINTNEXTLINE(misc-no-recursion)
decode_link_state_attribute_tlv(proto_tree *tree, tvbuff_t *tvb, gint offset, packet_info *pinfo, guint8 protocol_id)
{
guint16 type;
@@ -5350,6 +5351,7 @@ decode_link_state_attribute_tlv(proto_tree *tree, tvbuff_t *tvb, gint offset, pa
type = tvb_get_ntohs(tvb, offset);
length = tvb_get_ntohs(tvb, offset + 2);
+ increment_dissection_depth(pinfo);
switch (type) {
/* NODE ATTRIBUTE TLVs */
@@ -6449,6 +6451,7 @@ decode_link_state_attribute_tlv(proto_tree *tree, tvbuff_t *tvb, gint offset, pa
"Unknown BGP-LS Attribute TLV Code (%u)!", type);
break;
}
+ decrement_dissection_depth(pinfo);
return length + 4;
}
@@ -9574,6 +9577,7 @@ dissect_bgp_update_pmsi_attr(packet_info *pinfo, proto_tree *parent_tree, tvbuff
*
*/
void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_bgp_path_attr(proto_tree *subtree, tvbuff_t *tvb, guint16 path_attr_len, guint tvb_off, packet_info *pinfo)
{
guint8 bgpa_flags; /* path attributes */
@@ -9631,6 +9635,7 @@ dissect_bgp_path_attr(proto_tree *subtree, tvbuff_t *tvb, guint16 path_attr_len,
o = tvb_off;
+ increment_dissection_depth(pinfo);
while (i < path_attr_len) {
proto_item *ti_pa, *ti_flags;
int off;
@@ -10862,6 +10867,7 @@ dissect_bgp_path_attr(proto_tree *subtree, tvbuff_t *tvb, guint16 path_attr_len,
i += alen + aoff;
}
+ decrement_dissection_depth(pinfo);
{
/* FF: postponed BGPTYPE_LINK_STATE_ATTR dissection */
link_state_data *data = load_link_state_data(pinfo);
@@ -14102,8 +14108,7 @@ proto_register_bgp(void)
{NULL, NULL, -1}
};
- proto_bgp = proto_register_protocol("Border Gateway Protocol",
- "BGP", "bgp");
+ proto_bgp = proto_register_protocol("Border Gateway Protocol", "BGP", "bgp");
proto_register_field_array(proto_bgp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_bgp = expert_register_protocol(proto_bgp);