diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-07-30 02:04:07 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-07-30 02:04:07 +0200 |
commit | 1d3b690fbd9a89491d938188582a8031d91ebbc8 (patch) | |
tree | 57659e41e6245fb16bb93f2aa071745660dadc86 /src/resolve/resolved-dns-zone.c | |
parent | 6992efee44d3affd17dd9174e8673ae63ba01ec7 (diff) |
resolved: don't allow adding of ANY class/type RRs to local zones
Diffstat (limited to 'src/resolve/resolved-dns-zone.c')
-rw-r--r-- | src/resolve/resolved-dns-zone.c | 5 |
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; |