This aligns the naming rules with those of the kernel as set in the `dev_valid_name()`-function in `net/core/dev.c`. It also affects the validity of altnames. Signed-off-by: Christoph Anton Mitterer --- lib/utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/utils.c b/lib/utils.c index 0719281a..e4e5f337 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -851,8 +851,10 @@ static int __check_ifname(const char *name) { if (*name == '\0') return -1; + if (!strcmp(name, ".") || !strcmp(name, "..")) + return -1; while (*name) { - if (*name == '/' || isspace(*name)) + if (*name == '/' || *name == ':' || isspace(*name)) return -1; ++name; } -- 2.51.0