View previous topic :: View next topic |
Author |
Message |
magatgentoo n00b
Joined: 02 Apr 2004 Posts: 7 Location: Switzerland
|
Posted: Mon Apr 05, 2004 12:19 pm Post subject: TUN device with openvpn and 2.6.3-gentoo sources |
|
|
Hi all,
In trying to setup Open VPN between two linux machines, I discovered the following:
when "modprob" ing (I am still in testing phasis) tun
It creates the device tun (the find command is run in the /dev directory:
Code: |
# find * -name tun
misc/net/tun
net/tun
|
The problem comes from the definition of tun in /dev/net/:
Code: |
# ls -l
total 0
lr-xr-xr-x 1 root root 12 Apr 5 13:42 tun -> misc/net/tun
|
This is wrong
It should be: tun -> ../misc/net/tun
When I correct the error manually it works alright!
What is wrong?
I am using gentoo 2.6.3 kernel sources on the machine creating a problem. The TUN device comes from those sources.
Thanks in advance.
Magnus |
|
Back to top |
|
|
cryo n00b
Joined: 16 May 2003 Posts: 23 Location: Denmark
|
Posted: Thu Apr 08, 2004 3:23 pm Post subject: |
|
|
I have the same problem (same kernel also), but the openvpn init.d script is working around it:
Code: | checktundevice() {
if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
ebegin Detected broken /dev/net/tun symlink, fixing...
rm /dev/net/tun
ln -s /dev/misc/net/tun /dev/net/tun
eend $?
fi
} |
Still, it's pretty weird that you need a hack like that for it to work. A bug in devfs or the tun module?[/code] _________________ Sune. |
|
Back to top |
|
|
|