mirror of
https://github.com/systemd/systemd.git
synced 2025-03-29 06:50:16 +03:00
resolved: don't accept doing queries for invalid RR types
This commit is contained in:
parent
547973dea7
commit
9eae2bf318
@ -106,6 +106,14 @@ int dns_transaction_new(DnsTransaction **ret, DnsScope *s, DnsResourceKey *key)
|
||||
assert(s);
|
||||
assert(key);
|
||||
|
||||
/* Don't allow looking up invalid or pseudo RRs */
|
||||
if (IN_SET(key->type, DNS_TYPE_OPT, 0, DNS_TYPE_TSIG, DNS_TYPE_TKEY))
|
||||
return -EINVAL;
|
||||
|
||||
/* We only support the IN class */
|
||||
if (key->class != DNS_CLASS_IN)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
r = hashmap_ensure_allocated(&s->manager->dns_transactions, NULL);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
Loading…
x
Reference in New Issue
Block a user