diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2012-02-06 16:36:20 +0000 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2012-02-06 16:36:20 +0000 |
commit | 5a6adc8c17237da0944125ac6b06d81f4145bf5b (patch) | |
tree | 4a32b76b5e927aa34ba224157b2529aeab3d3ff9 /epan/dissectors/packet-dns.c | |
parent | 3dca816605698043bd4d0027ce64a4fd77fda6b1 (diff) |
From https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6704
DNS KEY RDATA contains an extra "Key id" field
Set Key Id is a generated item (in KEY and DNSKEY dns types)
svn path=/trunk/; revision=40877
Diffstat (limited to 'epan/dissectors/packet-dns.c')
-rw-r--r-- | epan/dissectors/packet-dns.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index 67038e40db..43038f9e2a 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -1623,7 +1623,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, { int rr_len = data_len; guint16 flags; - proto_item *tf; + proto_item *tf, *ti_gen; proto_tree *flags_tree; guint8 algo; guint16 key_id; @@ -1666,7 +1666,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, rr_len -= 1; key_id = compute_key_id(tvb, cur_offset-4, rr_len+4, algo); - proto_tree_add_text(rr_tree, tvb, 0, 0, "Key id: %u", key_id); + ti_gen = proto_tree_add_text(rr_tree, tvb, 0, 0, "Key id: %u", key_id); + PROTO_ITEM_SET_GENERATED(ti_gen); if (rr_len != 0) proto_tree_add_text(rr_tree, tvb, cur_offset, rr_len, "Public key"); @@ -1678,7 +1679,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, { int rr_len = data_len; guint16 flags; - proto_item *tf; + proto_item *tf, *ti_gen; proto_tree *flags_tree; guint8 algo; guint16 key_id; @@ -1742,7 +1743,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, rr_len -= 1; key_id = compute_key_id(tvb, cur_offset-4, rr_len+4, algo); - proto_tree_add_text(rr_tree, tvb, 0, 0, "Key id: %u", key_id); + ti_gen = proto_tree_add_text(rr_tree, tvb, 0, 0, "Key id: %u", key_id); + PROTO_ITEM_SET_GENERATED(ti_gen); if (rr_len != 0) proto_tree_add_text(rr_tree, tvb, cur_offset, rr_len, "Public key"); |