Merge pull request #5146 from ssahani/ifname-alias

networkd: Allow ':' in label

This reverts a341dfe563 and takes a slightly different approach: anything is
allowed in network interface labels, but network interface names are verified
as before (i.e. amongst other things, no colons are allowed there).
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2017-01-31 20:36:20 -05:00
committed by GitHub
3 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -887,7 +887,7 @@ bool ifname_valid(const char *p) {
if ((unsigned char) *p <= 32U)
return false;
if (*p == '/')
if (*p == ':' || *p == '/')
return false;
numeric = numeric && (*p >= '0' && *p <= '9');