From 1d3b690fbd9a89491d938188582a8031d91ebbc8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 30 Jul 2014 02:04:07 +0200 Subject: resolved: don't allow adding of ANY class/type RRs to local zones --- src/resolve/resolved-dns-zone.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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; -- cgit v1.2.3-54-g00ecf