networkd: Allow ':' in label

IFA_LABEL does not need much of a validation except the length
that is IFNAMSIZ as seen from kernel code.
This commit is contained in:
Susant Sahani
2017-01-25 00:07:52 +05:30
parent 7ed95830dc
commit 7454aec7ff

View 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;
}