aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Quantin <pascal@wireshark.org>2019-08-16 12:52:16 +0200
committerPascal Quantin <pascal@wireshark.org>2019-08-16 12:00:13 +0000
commit32102247cefcdbf582131b4564aa8ccc46b741c2 (patch)
tree17db62f1b6adf21b3f402ceec6c02433fb1dfff9
parent137993eceb2a449c9192d554385cf9d0351d1136 (diff)
DNS: fix bytes highlight for name length and labels count
Those generated fields are linked to the dns.qry.name field, so highlight the same bytes. Bug: 15999 Change-Id: Ia989b79a9ec14140472b79fdf7acea6e67baee68 Reviewed-on: https://code.wireshark.org/review/34299 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org>
-rw-r--r--epan/dissectors/packet-dns.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c
index fb8eec6147..96b72dc7f2 100644
--- a/epan/dissectors/packet-dns.c
+++ b/epan/dissectors/packet-dns.c
@@ -1489,11 +1489,11 @@ dissect_dns_query(tvbuff_t *tvb, int offset, int dns_data_offset,
/* The number of used bytes for qname is the total used bytes minus 2 bytes for qtype and 2 bytes for qclass */
proto_tree_add_string(q_tree, hf_dns_qry_name, tvb, offset, used_bytes - 4, name_out);
- tq = proto_tree_add_uint(q_tree, hf_dns_qry_name_len, tvb, offset, name_len, name_len > 1 ? name_len : 0);
+ tq = proto_tree_add_uint(q_tree, hf_dns_qry_name_len, tvb, offset, used_bytes - 4, name_len > 1 ? name_len : 0);
proto_item_set_generated(tq);
labels = qname_labels_count(name, name_len);
- tq = proto_tree_add_uint(q_tree, hf_dns_count_labels, tvb, offset, name_len, labels);
+ tq = proto_tree_add_uint(q_tree, hf_dns_count_labels, tvb, offset, used_bytes - 4, labels);
proto_item_set_generated(tq);
offset += used_bytes - 4;