networkd: Allow ':' in label
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 2b698d9..ffd2e18 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;
         }