]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolve: make config_parse_dnssd_service_name() accepts an empty string
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 17 Nov 2020 18:23:32 +0000 (03:23 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 17 Nov 2020 18:23:32 +0000 (03:23 +0900)
src/resolve/resolved-conf.c

index b454472e6356c1fe3052e98a6dbf1940e68be8ad..fd3c1bfecde2c398bc25b9317e57bd1b80ca1cfe 100644 (file)
@@ -251,8 +251,8 @@ int config_parse_dnssd_service_name(
         assert(s);
 
         if (isempty(rvalue)) {
-                log_syntax(unit, LOG_ERR, filename, line, 0, "Service instance name can't be empty. Ignoring.");
-                return -EINVAL;
+                s->name_template = mfree(s->name_template);
+                return 0;
         }
 
         r = free_and_strdup(&s->name_template, rvalue);