summaryrefslogtreecommitdiff
path: root/src/resolve
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-30 02:04:07 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-30 02:04:07 +0200
commit1d3b690fbd9a89491d938188582a8031d91ebbc8 (patch)
tree57659e41e6245fb16bb93f2aa071745660dadc86 /src/resolve
parent6992efee44d3affd17dd9174e8673ae63ba01ec7 (diff)
resolved: don't allow adding of ANY class/type RRs to local zones
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/resolved-dns-zone.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-zone.c b/src/resolve/resolved-dns-zone.c
index 2325ddfe7f..12a8512c7e 100644
--- a/src/resolve/resolved-dns-zone.c
+++ b/src/resolve/resolved-dns-zone.c
@@ -165,6 +165,11 @@ int dns_zone_put(DnsZone *z, DnsResourceRecord *rr) {
assert(z);
assert(rr);
+ if (rr->key->class == DNS_CLASS_ANY)
+ return -EINVAL;
+ if (rr->key->type == DNS_TYPE_ANY)
+ return -EINVAL;
+
existing = dns_zone_get(z, rr);
if (existing)
return 0;