[Vtun-devel] IOCTL problems on linux-2.4.14
Status: Inactive
Brought to you by:
mtbishop
|
From: Helge J. <je...@sl...> - 2001-10-22 14:24:37
|
I tried to install vtun on a stock linux-2.4.14 kernel, and have hit
IOCTL problems. I have ploughed throug both vtun-devel and vtun-users
but it does not seem (to me) that I am hitting the IOCTL problems
described on vtun-devel....
I have downloaded vtun-2.5b1.tgz and compilation goes smootly, but i get:
[root@apollon sbin]# strace -ff ./vtund -n -f /etc/vtund.client.conf
aarhus_helge-home 194.239.238.2
...
open("/dev/net/tun", O_RDWR) = 5
ioctl(5, 0x400454ca, 0xbffff450) = -1 EINVAL (Invalid argument)
close(5) = 0
...
writev(2, [{"vtund[16936]: Can\'t allocate tun"..., 61}, {"\n", 1}],
2vtund[16936]: Can't allocate tun device. Invalid argument(22)
) = 62
I seem to be using the correct headers for compilation, since I have:
#define TUNSETIFF _IOW('T', 202, int)
in /usr/src/linux-2.4.14/include/linux/if_tun.h
and gcc ...[all the other options] -dM -E tun_dev.c | grep TUNSETIFF says:
#define TUNSETIFF _IOW('T', 202, int)
I tried with the latest tun_dev.c from CVS (revision 1.2), but that gave
the same result.
I can verify (using a debugger) that the offending call is the
ioctl-call in tun_dev.c:88, which returns (as can also be seen from the
strace) -1 EINVAL, with errno set to 22, meaning "Invalid argument".
Has anyone got any idea about how i should go about debugging this,
short of inserting printk lines in linux-2.4.14/drivers/net/tun.c ?
--
Helge Jensen
|