summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-packet.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-30 02:05:23 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-30 02:05:23 +0200
commit0e2bcd6a1783008a94bdef4c828c5f8e0eba1706 (patch)
tree742dc09f1fb187da3e028cda19fc0c3b37727908 /src/resolve/resolved-dns-packet.c
parent1d3b690fbd9a89491d938188582a8031d91ebbc8 (diff)
resolved: don't accept messages with ANY RRs
Diffstat (limited to 'src/resolve/resolved-dns-packet.c')
-rw-r--r--src/resolve/resolved-dns-packet.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
index 5eaee2cb4f..1636362afe 100644
--- a/src/resolve/resolved-dns-packet.c
+++ b/src/resolve/resolved-dns-packet.c
@@ -868,6 +868,12 @@ int dns_packet_read_rr(DnsPacket *p, DnsResourceRecord **ret, size_t *start) {
if (r < 0)
goto fail;
+ if (key->class == DNS_CLASS_ANY ||
+ key->type == DNS_TYPE_ANY) {
+ r = -EBADMSG;
+ goto fail;
+ }
+
rr = dns_resource_record_new(key);
if (!rr) {
r = -ENOMEM;