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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-03-26 14:14:38 +01:00
parent 058946d1f9
commit 200b4f3d80

View File

@@ -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.)");