Here is the patch for TUN/TAP to remove that suboptimality :).
So we won't call dev_alloc_name if name is not a template.
--- tun.c.old Tue Oct 30 21:00:55 2001
+++ tun.c Tue Oct 30 21:10:17 2001
@@ -377,8 +377,11 @@
if (*ifr->ifr_name)
name = ifr->ifr_name;
- if ((err = dev_alloc_name(&tun->dev, name)) < 0)
- goto failed;
+ if (strchr(name, '%')) {
+ err = dev_alloc_name(&tun->dev, name);
+ if (err) goto failed;
+ }
+
if ((err = register_netdevice(&tun->dev)))
goto failed;
Untested but looks obvious.
Max
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/