summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-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 e3593fc0ea..3f7e77da3e 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -839,14 +839,14 @@ int config_parse_hostname(const char *unit,
if (r < 0)
return r;
- if (!hostname_is_valid(hn)) {
+ 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);
return 0;
}