plugins: netlink: slightly stricter ifname validation
Check if ifname contains double periods, this should *not* be a valid
name, though eth0.10 is, et0..10 is not.  Should protect better against
directory traversal attacks.
@@ -120,6 +120,9 @@ static int validate_ifname(const char *ifname)
if (strlen(ifname) >= IFNAMSIZ)
return 1;
+ if (strstr(ifname, ".."))
+ return 1;
+
while (*ifname) {
if (*ifname == '/' || isspace(*ifname))
return 1;
