]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: allow trailing dot on fqdn in config file
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 28 Jul 2015 02:21:07 +0000 (22:21 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 6 Aug 2015 00:49:20 +0000 (20:49 -0400)
src/network/networkd-network.c

index e3ac70ff3339c101f6aa8fd258ed20e8ed5f5586..9a19109b9fe38da9139a348606b1776567dfdfa3 100644 (file)
@@ -838,14 +838,14 @@ int config_parse_hostname(const char *unit,
         if (r < 0)
                 return r;
 
-        if (!hostname_is_valid(hn, false)) {
+        if (!hostname_is_valid(hn, true)) {
                 log_syntax(unit, LOG_ERR, filename, line, EINVAL, "hostname is not valid, ignoring assignment: %s", rvalue);
 
                 free(hn);
                 return 0;
         }
 
-        *hostname = hn;
+        *hostname = hostname_cleanup(hn, false);
 
         return 0;
 }