aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorHadriel Kaplan <hadrielk@yahoo.com>2015-01-22 22:40:01 -0500
committerAnders Broman <a.broman58@gmail.com>2015-01-23 05:33:44 +0000
commit888229bebd2cbb070cc89168510a880b50daf6c4 (patch)
tree9f8b9651223ca04384f1ca9e2973663037ecb695 /epan/dissectors
parent407b7034e34265a3dff67cb28a6a8bac89f41a30 (diff)
Make netlink dissector register the attribute length header field info
The header field info variable named hfi_netlink_len isn't registered by the netlink dissector, but is added to the tree, resulting in a runtime error. This commit changes the variable name slightly, to be more accurate, and correctly registers it. Bug: 10884 Change-Id: Iaa4e556d5bbe87b72a0cdca2fbf397fa95e074cc Reviewed-on: https://code.wireshark.org/review/6751 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-netlink.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/epan/dissectors/packet-netlink.c b/epan/dissectors/packet-netlink.c
index 9cb561b3b6..a6e140ea93 100644
--- a/epan/dissectors/packet-netlink.c
+++ b/epan/dissectors/packet-netlink.c
@@ -110,8 +110,8 @@ static header_field_info hfi_netlink_hdr_pid NETLINK_HFI_INIT =
{ "Port ID", "netlink.hdr_pid", FT_UINT32, BASE_HEX,
NULL, 0x00, NULL, HFILL };
-static header_field_info hfi_netlink_len NETLINK_HFI_INIT =
- { "Len", "netlink.len", FT_UINT16, BASE_DEC,
+static header_field_info hfi_netlink_attr_len NETLINK_HFI_INIT =
+ { "Len", "netlink.attr_len", FT_UINT16, BASE_DEC,
NULL, 0x00, NULL, HFILL };
static gint ett_netlink_cooked = -1;
@@ -144,7 +144,7 @@ dissect_netlink_attributes(tvbuff_t *tvb, header_field_info *hfi_type, int ett,
attr_tree = proto_tree_add_subtree(tree, tvb, offset, end_offset - offset, ett, &ti, "Attribute");
- proto_tree_add_item(attr_tree, &hfi_netlink_len, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(attr_tree, &hfi_netlink_attr_len, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
rta_type = tvb_get_letohs(tvb, offset);
@@ -288,6 +288,9 @@ proto_register_netlink(void)
&hfi_netlink_hdr_flags,
&hfi_netlink_hdr_seq,
&hfi_netlink_hdr_pid,
+
+ /* Netlink message attribute */
+ &hfi_netlink_attr_len,
};
#endif