diff --git a/src/basic/hostname-util.c b/src/basic/hostname-util.c index 5c3157fdf2..82cd37b154 100644 --- a/src/basic/hostname-util.c +++ b/src/basic/hostname-util.c @@ -89,6 +89,8 @@ int gethostname_strict(char **ret) { } bool valid_ldh_char(char c) { + /* "LDH" → "Letters, digits, hyphens", as per RFC 5890, Section 2.3.1 */ + return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||