summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSusant Sahani <susant@redhat.com>2017-02-28 16:54:33 +0530
committerSusant Sahani <susant@redhat.com>2017-02-28 16:54:33 +0530
commita87d19fe0a9fd1bc66663d3aefb55a10c2fd3af9 (patch)
tree0c822aab36f79660a2c2c5b0419c432d37c19d08 /src
parent2680894816b49b9e55f0a42a420d0540892e9b61 (diff)
networkd: use address_label_valid for label validation
Diffstat (limited to 'src')
-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;
}