diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-12-08 14:52:25 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-12-08 22:53:13 +0000 |
commit | c6c3ee1d62a459548c95511cc02c96ae6fe96377 (patch) | |
tree | 1086c938ff0e6e2a80fa81d57c8498e3f54fb7cb /epan/dissectors/packet-dns.c | |
parent | 803d47fd50c9f5e76cd0a43f34eb587e0f1d6804 (diff) |
TTLs are unsigned; format them with unsigned_time_secs_to_str().
Change-Id: I489c981e02b2ed0331981003777a5de54ba8221f
Reviewed-on: https://code.wireshark.org/review/35367
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-dns.c')
-rw-r--r-- | epan/dissectors/packet-dns.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index 6293d093c1..ccf96f81f5 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -1595,7 +1595,7 @@ add_rr_to_tree(proto_tree *rr_tree, tvbuff_t *tvb, int offset, } offset += 2; ttl_item = proto_tree_add_item_ret_uint(rr_tree, hf_dns_rr_ttl, tvb, offset, 4, ENC_BIG_ENDIAN, &ttl_value); - proto_item_append_text(ttl_item, " (%s)", signed_time_secs_to_str(wmem_packet_scope(), ttl_value)); + proto_item_append_text(ttl_item, " (%s)", unsigned_time_secs_to_str(wmem_packet_scope(), ttl_value)); if (ttl_value & 0x80000000) { expert_add_info(pinfo, ttl_item, &ei_ttl_high_bit_set); } @@ -2011,19 +2011,19 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, cur_offset += 4; ti_soa = proto_tree_add_item(rr_tree, hf_dns_soa_refresh_interval, tvb, cur_offset, 4, ENC_BIG_ENDIAN); - proto_item_append_text(ti_soa, " (%s)", signed_time_secs_to_str(wmem_packet_scope(), tvb_get_ntohl(tvb, cur_offset))); + proto_item_append_text(ti_soa, " (%s)", unsigned_time_secs_to_str(wmem_packet_scope(), tvb_get_ntohl(tvb, cur_offset))); cur_offset += 4; ti_soa = proto_tree_add_item(rr_tree, hf_dns_soa_retry_interval, tvb, cur_offset, 4, ENC_BIG_ENDIAN); - proto_item_append_text(ti_soa, " (%s)", signed_time_secs_to_str(wmem_packet_scope(), tvb_get_ntohl(tvb, cur_offset))); + proto_item_append_text(ti_soa, " (%s)", unsigned_time_secs_to_str(wmem_packet_scope(), tvb_get_ntohl(tvb, cur_offset))); cur_offset += 4; ti_soa = proto_tree_add_item(rr_tree, hf_dns_soa_expire_limit, tvb, cur_offset, 4, ENC_BIG_ENDIAN); - proto_item_append_text(ti_soa, " (%s)", signed_time_secs_to_str(wmem_packet_scope(), tvb_get_ntohl(tvb, cur_offset))); + proto_item_append_text(ti_soa, " (%s)", unsigned_time_secs_to_str(wmem_packet_scope(), tvb_get_ntohl(tvb, cur_offset))); cur_offset += 4; ti_soa = proto_tree_add_item(rr_tree, hf_dns_soa_minimum_ttl, tvb, cur_offset, 4, ENC_BIG_ENDIAN); - proto_item_append_text(ti_soa, " (%s)", signed_time_secs_to_str(wmem_packet_scope(), tvb_get_ntohl(tvb, cur_offset))); + proto_item_append_text(ti_soa, " (%s)", unsigned_time_secs_to_str(wmem_packet_scope(), tvb_get_ntohl(tvb, cur_offset))); } break; @@ -3060,7 +3060,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, rr_len -= 1; ti = proto_tree_add_item(rr_tree, hf_dns_rrsig_original_ttl, tvb, cur_offset, 4, ENC_BIG_ENDIAN); - proto_item_append_text(ti, " (%s)", signed_time_secs_to_str(wmem_packet_scope(), tvb_get_ntohl(tvb, cur_offset))); + proto_item_append_text(ti, " (%s)", unsigned_time_secs_to_str(wmem_packet_scope(), tvb_get_ntohl(tvb, cur_offset))); cur_offset += 4; rr_len -= 4; |