summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-rr.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-09-04 00:15:48 +0200
committerTom Gundersen <teg@jklm.no>2015-09-16 17:03:17 +0200
commit7c1ff6ac3d9e3acae1d601d40728cf7ccc9a7730 (patch)
tree590143b704aef57c7a223ca22d92f3e9a3be55b6 /src/resolve/resolved-dns-rr.c
parent04f93201207d76e01598d4a431de5da5739014c9 (diff)
resolved: rr - introduce dns_resource_key_new_cname()
Creates a new CNAME RR key with the same class and name as an existing key.
Diffstat (limited to 'src/resolve/resolved-dns-rr.c')
-rw-r--r--src/resolve/resolved-dns-rr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-rr.c b/src/resolve/resolved-dns-rr.c
index f31644eebc..42ccd05578 100644
--- a/src/resolve/resolved-dns-rr.c
+++ b/src/resolve/resolved-dns-rr.c
@@ -48,6 +48,12 @@ DnsResourceKey* dns_resource_key_new(uint16_t class, uint16_t type, const char *
return k;
}
+DnsResourceKey* dns_resource_key_new_cname(const DnsResourceKey *key) {
+ assert(key);
+
+ return dns_resource_key_new(key->class, DNS_TYPE_CNAME, DNS_RESOURCE_KEY_NAME(key));
+}
+
DnsResourceKey* dns_resource_key_new_consume(uint16_t class, uint16_t type, char *name) {
DnsResourceKey *k;