2.4.13-ac5 && vtun not working

Lehmann
2001-10-30T01:17:18Z

After upgrading to linux-2.4.13-ac5, everything seems to work, except all
my vtun tunnels.

a _lot_ of searching revealed this code fragment:

/*
* Verify the string as this thing may have come from
* the user. There must be one "%d" and no other "%"
* characters.
*/
p = strchr(name, '%');
if (!p || p[1] != 'd' || strchr(p+2, '%'))
return -EINVAL;

Well, obviously my devicename _do_ come "from the user", as I really like
to name my tun devices (and everything else). The problem is that vtund
passes in "tun2" as devicename, which does not contain a "%d".

Maybe this piece of code is designed to fix security problems, but it
keeps vtund from working properly.

How about this change?

- if (!p || p[1] != 'd' || strchr(p+2, '%'))
+ if (p && (p[1] != 'd' || strchr(p+2, '%')))

--
-----==- |
----==-- _ |
---==---(_)__ __ ____ __ Marc Lehmann +--
--==---/ / _ \/ // /\ \/ / pcg@goof.com |e|
-=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+
The choice of a GNU generation |
|