diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2017-06-22 15:59:23 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-06-22 21:07:21 +0000 |
commit | 23c7d5f4e7dc6c087f2b895f5d1907d7f980eeac (patch) | |
tree | e9be5db533a530407b199adc326fe452a4571ac3 | |
parent | 880c2aa04ff2bbff6f1b1df286da3cc6c829bc69 (diff) |
dns: Put request/response tracking last in the tree
Change-Id: I56b99941db63ca87cd233112967592c948d2a390
Reviewed-on: https://code.wireshark.org/review/22361
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r-- | epan/dissectors/packet-dns.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index 74ace7f794..44d2084cf6 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -3704,30 +3704,6 @@ dissect_dns_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, dns_trans->req_time=pinfo->abs_ts; } - /* print state tracking in the tree */ - if (!(flags&F_RESPONSE)) { - /* This is a request */ - if (dns_trans->rep_frame) { - proto_item *it; - - it=proto_tree_add_uint(dns_tree, hf_dns_response_in, tvb, 0, 0, dns_trans->rep_frame); - PROTO_ITEM_SET_GENERATED(it); - } - } else { - /* This is a reply */ - if (dns_trans->req_frame) { - proto_item *it; - nstime_t ns; - - it=proto_tree_add_uint(dns_tree, hf_dns_response_to, tvb, 0, 0, dns_trans->req_frame); - PROTO_ITEM_SET_GENERATED(it); - - nstime_delta(&ns, &pinfo->abs_ts, &dns_trans->req_time); - it=proto_tree_add_time(dns_tree, hf_dns_time, tvb, 0, 0, &ns); - PROTO_ITEM_SET_GENERATED(it); - } - } - if (is_tcp) { /* Put the length indication into the tree. */ proto_tree_add_item(dns_tree, hf_dns_length, tvb, offset - 2, 2, ENC_BIG_ENDIAN); @@ -3855,6 +3831,30 @@ dissect_dns_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pinfo, is_mdns); } + /* print state tracking in the tree */ + if (!(flags&F_RESPONSE)) { + /* This is a request */ + if (dns_trans->rep_frame) { + proto_item *it; + + it=proto_tree_add_uint(dns_tree, hf_dns_response_in, tvb, 0, 0, dns_trans->rep_frame); + PROTO_ITEM_SET_GENERATED(it); + } + } else { + /* This is a reply */ + if (dns_trans->req_frame) { + proto_item *it; + nstime_t ns; + + it=proto_tree_add_uint(dns_tree, hf_dns_response_to, tvb, 0, 0, dns_trans->req_frame); + PROTO_ITEM_SET_GENERATED(it); + + nstime_delta(&ns, &pinfo->abs_ts, &dns_trans->req_time); + it=proto_tree_add_time(dns_tree, hf_dns_time, tvb, 0, 0, &ns); + PROTO_ITEM_SET_GENERATED(it); + } + } + /* Collect stats */ if (is_mdns) { /* TODO */ |