summaryrefslogtreecommitdiff
path: root/src/network/networkd-address.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd-address.c')
-rw-r--r--src/network/networkd-address.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index e34793e50b..2e6c763aba 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -821,8 +821,8 @@ int config_parse_label(
if (r < 0)
return r;
- if (strlen(rvalue) >= IFNAMSIZ) {
- log_syntax(unit, LOG_ERR, filename, line, 0, "Interface label is too long, ignoring assignment: %s", rvalue);
+ if (!address_label_valid(rvalue)) {
+ log_syntax(unit, LOG_ERR, filename, line, 0, "Interface label is too long or invalid, ignoring assignment: %s", rvalue);
return 0;
}