diff options
-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; |