summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-rr.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-30 16:30:25 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-30 16:47:21 +0200
commit8bf52d3d17d364438191077d0750b8b80b5dc53a (patch)
tree65fdbe0ce790585840ed2f96febafbb9ead8d41b /src/resolve/resolved-dns-rr.c
parentab0cf8f8ff819c386d53b9ca29e9ac2d6b6e8f0f (diff)
resolved: include SOA records in LLMNR replies for non-existing RRs to allow negative caching
Diffstat (limited to 'src/resolve/resolved-dns-rr.c')
-rw-r--r--src/resolve/resolved-dns-rr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-rr.c b/src/resolve/resolved-dns-rr.c
index 5097eff083..8b8858848c 100644
--- a/src/resolve/resolved-dns-rr.c
+++ b/src/resolve/resolved-dns-rr.c
@@ -172,6 +172,16 @@ DnsResourceRecord* dns_resource_record_new(DnsResourceKey *key) {
return rr;
}
+DnsResourceRecord* dns_resource_record_new_full(uint16_t class, uint16_t type, const char *name) {
+ _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
+
+ key = dns_resource_key_new(class, type, name);
+ if (!key)
+ return NULL;
+
+ return dns_resource_record_new(key);
+}
+
DnsResourceRecord* dns_resource_record_ref(DnsResourceRecord *rr) {
if (!rr)
return NULL;