]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: Allow ':' in label 5146/head
authorSusant Sahani <susant@redhat.com>
Tue, 24 Jan 2017 18:37:52 +0000 (00:07 +0530)
committerSusant Sahani <susant@redhat.com>
Tue, 24 Jan 2017 18:37:52 +0000 (00:07 +0530)
IFA_LABEL does not need much of a validation except the length
that is IFNAMSIZ as seen from kernel code.

src/network/networkd-address.c

index 2b698d95319fc34d1fadff1d277ad6151c45c0d8..ffd2e18a45fdb3d944bc729901e2e61cb0aeb96b 100644 (file)
@@ -809,8 +809,8 @@ int config_parse_label(
         if (r < 0)
                 return r;
 
-        if (!ifname_valid(rvalue)) {
-                log_syntax(unit, LOG_ERR, filename, line, 0, "Interface label is not valid or too long, ignoring assignment: %s", rvalue);
+        if (strlen(rvalue) >= IFNAMSIZ) {
+                log_syntax(unit, LOG_ERR, filename, line, 0, "Interface label is too long, ignoring assignment: %s", rvalue);
                 return 0;
         }