From 3fa8f42c761f917a4a6e28f0efcac7754d739090 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 10 Sep 2020 16:18:45 -0700 Subject: bpdu: fix some string types. As per IEEE Std 802.1Q-2016, section 13.8 "MST Configuration Identifier (MCID)", The Configuration Name, a variable length text string encoded within a fixed field of 32 octets, conforming to IETF RFC 2271's definition of SnmpAdminString. If the Configuration Name is less than 32 characters, the text string should be terminated by the NUL character, with the remainder of the 32-octet field filled with NUL characters. Otherwise, the text string is encoded with no terminating NUL character. so it's not FT_STRINGZ, it's FT_STRINGZPAD. This applies to other configuration names as well. --- epan/dissectors/packet-bpdu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epan/dissectors/packet-bpdu.c b/epan/dissectors/packet-bpdu.c index 80db9fdda9..9b25118bad 100644 --- a/epan/dissectors/packet-bpdu.c +++ b/epan/dissectors/packet-bpdu.c @@ -1141,7 +1141,7 @@ proto_register_bpdu(void) NULL, HFILL }}, { &hf_bpdu_mst_config_name, { "MST Config name", "mstp.config_name", - FT_STRINGZ, BASE_NONE, NULL, 0x0, + FT_STRINGZPAD, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_bpdu_mst_config_revision_level, { "MST Config revision", "mstp.config_revision_level", @@ -1237,7 +1237,7 @@ proto_register_bpdu(void) NULL, HFILL }}, { &hf_bpdu_spt_config_name, {"SPT Config name", "mstp.config_name", - FT_STRINGZ, BASE_NONE, NULL, 0x0, + FT_STRINGZPAD, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_bpdu_spt_config_revision_level, { "SPT Config revision", "mstp.config_revision_level", -- cgit v1.2.3