From: Zbigniew Jędrzejewski-Szmek Date: Fri, 26 Mar 2021 13:14:38 +0000 (+0100) Subject: resolvectl: suppress warning about --type for names with a dot X-Git-Tag: v248-2~4^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F19131%2Fhead;p=thirdparty%2Fsystemd.git resolvectl: suppress warning about --type for names with a dot People don't generally type the trailing dot by mistake, so let's treat this as indication that they want to resolve this particular hostname. --- diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c index 269151b9b1d..52bbae3293b 100644 --- a/src/resolve/resolvectl.c +++ b/src/resolve/resolvectl.c @@ -476,7 +476,7 @@ static int resolve_record(sd_bus *bus, const char *name, uint16_t class, uint16_ log_debug("Resolving %s %s %s (interface %s).", name, dns_class_to_string(class), dns_type_to_string(type), isempty(arg_ifname) ? "*" : arg_ifname); - if (single_label_nonsynthetic(name)) + if (dns_name_dot_suffixed(name) == 0 && single_label_nonsynthetic(name)) log_notice("(Note that search domains are not appended when --type= is specified. " "Please specify fully qualified domain names, or remove --type= switch from invocation in order to request regular hostname resolution.)");