Hi Robert,
Thanks for this observation. I have removed the TTL field from the question section in
master repo.
Dan
On 04/18/2014 02:58 AM, Robert S. Edmonds wrote:
Question resource records do not include a TTL field
(per RFC 1035
§4.1.2), so it seems strange to display a zero TTL when printing the
question section.
This makes kdig match the question section dump style of drill and dig.
---
src/utils/common/exec.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/utils/common/exec.c b/src/utils/common/exec.c
index 92af2df..aa5485d 100644
--- a/src/utils/common/exec.c
+++ b/src/utils/common/exec.c
@@ -200,9 +200,10 @@ static void print_section_question(const knot_dname_t *owner,
size_t buflen = 8192;
char *buf = calloc(buflen, 1);
knot_rrset_t *question = knot_rrset_new(owner, qtype, qclass, NULL);
+ knot_dump_style_t qstyle = style->style;
+ qstyle.show_ttl = 0;
- if (knot_rrset_txt_dump_header(question, 0, buf, buflen,
- &(style->style)) < 0) {
+ if (knot_rrset_txt_dump_header(question, 0, buf, buflen, &qstyle) < 0) {
WARN("can't print whole question section\n");
}