summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-bus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-01-11 20:05:29 +0100
committerLennart Poettering <lennart@poettering.net>2016-01-11 20:05:29 +0100
commitd0129ddb9fbb07bed7c8ea51b8031f824bf506fb (patch)
tree9467e4acba84631984450893495e50a9bde15720 /src/resolve/resolved-bus.c
parent274b874830b93e6592f190608866133384066a35 (diff)
resolved: refuse doing queries for known-obsolete RR types
Given how fragile DNS servers are with some DNS types, and given that we really should avoid confusing them with known-weird lookups, refuse doing lookups for known-obsolete RR types.
Diffstat (limited to 'src/resolve/resolved-bus.c')
-rw-r--r--src/resolve/resolved-bus.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c
index 87eeb6055d..437b1929f4 100644
--- a/src/resolve/resolved-bus.c
+++ b/src/resolve/resolved-bus.c
@@ -563,6 +563,8 @@ static int bus_method_resolve_record(sd_bus_message *message, void *userdata, sd
if (!dns_type_is_valid_query(type))
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid RR type for query %" PRIu16, type);
+ if (dns_type_is_obsolete(type))
+ return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED, "Specified DNS RR type %" PRIu16 " is obsolete.", type);
r = check_ifindex_flags(ifindex, &flags, 0, error);
if (r < 0)