summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-07-27 22:21:07 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-08-05 20:49:20 -0400
commit79f17ea6f8d885da063f50d966891adaee236b26 (patch)
treebe2e35a60c661b6bf226d4b1204d39f3914e91fa
parent34ad609010244513e0c31fdde59ce1cf84d4c3f6 (diff)
networkd: allow trailing dot on fqdn in config file
-rw-r--r--src/network/networkd-network.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index e3ac70ff33..9a19109b9f 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -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;
}