diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-02-04 17:06:33 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-01-29 12:13:06 -0500 |
commit | fc8eec10f6a95a7ebb0f88954b49f2ed731c3a15 (patch) | |
tree | ec5c9305a24acd7ee908352ef5198006a0d3f5d0 /src/resolve | |
parent | 99e5ca6d8bf140444a15c0588fe797b27da5538c (diff) |
resolved: calculate and print tags for DNSKEY records
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/resolved-dns-rr.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/resolve/resolved-dns-rr.c b/src/resolve/resolved-dns-rr.c index 83dce76565..6b3be2a80c 100644 --- a/src/resolve/resolved-dns-rr.c +++ b/src/resolve/resolved-dns-rr.c @@ -25,6 +25,7 @@ #include "dns-domain.h" #include "dns-type.h" #include "hexdecoct.h" +#include "resolved-dns-dnssec.h" #include "resolved-dns-packet.h" #include "resolved-dns-rr.h" #include "string-table.h" @@ -973,6 +974,9 @@ const char *dns_resource_record_to_string(DnsResourceRecord *rr) { _cleanup_free_ char *alg = NULL; char *ss; int n, n1; + uint16_t key_tag; + + key_tag = dnssec_keytag(rr, true); r = dnssec_algorithm_to_string_alloc(rr->dnskey.algorithm, &alg); if (r < 0) @@ -995,12 +999,15 @@ const char *dns_resource_record_to_string(DnsResourceRecord *rr) { return NULL; r = asprintf(&ss, "%s\n" - "%*s-- Flags:%s%s%s", + "%*s-- Flags:%s%s%s\n" + "%*s-- Key tag: %u", s, n1, "", rr->dnskey.flags & DNSKEY_FLAG_SEP ? " SEP" : "", rr->dnskey.flags & DNSKEY_FLAG_REVOKE ? " REVOKE" : "", - rr->dnskey.flags & DNSKEY_FLAG_ZONE_KEY ? " ZONE_KEY" : ""); + rr->dnskey.flags & DNSKEY_FLAG_ZONE_KEY ? " ZONE_KEY" : "", + n1, "", + key_tag); if (r < 0) return NULL; free(s); |