diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 17:44:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 17:44:17 +0000 |
commit | 2d78050fd56b8188aa5a65ad2667e301b60eea45 (patch) | |
tree | b54d4adac6de0a196b8bb8a67b34fe186c21378f /epan/dissectors/packet-netlink.c | |
parent | Adding upstream version 4.2.2. (diff) | |
download | wireshark-2d78050fd56b8188aa5a65ad2667e301b60eea45.tar.xz wireshark-2d78050fd56b8188aa5a65ad2667e301b60eea45.zip |
Adding upstream version 4.2.4.upstream/4.2.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-netlink.c')
-rw-r--r-- | epan/dissectors/packet-netlink.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/epan/dissectors/packet-netlink.c b/epan/dissectors/packet-netlink.c index b437ed34..200d4718 100644 --- a/epan/dissectors/packet-netlink.c +++ b/epan/dissectors/packet-netlink.c @@ -14,6 +14,8 @@ #include <epan/packet.h> #include <epan/arptypes.h> #include <epan/exceptions.h> +#include <epan/prefs.h> + #include <wiretap/wtap.h> #include <wsutil/ws_roundup.h> @@ -152,6 +154,7 @@ static int * const netlink_header_standard_flags[] = { static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_netlink_attributes_common(tvbuff_t *tvb, int hf_type, int ett_tree, int ett_attrib, void *data, struct packet_netlink_data *nl_data, proto_tree *tree, int offset, int length, netlink_attributes_cb_t cb) { int encoding; @@ -261,6 +264,9 @@ dissect_netlink_attributes_common(tvbuff_t *tvb, int hf_type, int ett_tree, int offset += 2; proto_item_append_text(ti, " %u", rta_type); + // In theory we should use increment_dissection_depth here, but that + // requires adding pinfo all over packet-netlink*.[ch] and we're limited + // to 262144 bytes (WTAP_MAX_PACKET_SIZE_STANDARD). dissect_netlink_attributes(tvb, hf_type, ett_attrib, data, nl_data, attr_tree, offset, rta_len - 4, cb); } @@ -276,6 +282,7 @@ dissect_netlink_attributes_common(tvbuff_t *tvb, int hf_type, int ett_tree, int } int +// NOLINTNEXTLINE(misc-no-recursion) dissect_netlink_attributes(tvbuff_t *tvb, int hf_type, int ett, void *data, struct packet_netlink_data *nl_data, proto_tree *tree, int offset, int length, netlink_attributes_cb_t cb) { return dissect_netlink_attributes_common(tvb, hf_type, ett, -1, data, nl_data, tree, offset, length, cb); |