Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
TUN device with openvpn and 2.6.3-gentoo sources
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
magatgentoo
n00b
n00b


Joined: 02 Apr 2004
Posts: 7
Location: Switzerland

PostPosted: Mon Apr 05, 2004 12:19 pm    Post subject: TUN device with openvpn and 2.6.3-gentoo sources Reply with quote

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
Code:

# modprobe 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
View user's profile Send private message
cryo
n00b
n00b


Joined: 16 May 2003
Posts: 23
Location: Denmark

PostPosted: Thu Apr 08, 2004 3:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum