Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 46933 - tun device is not correctly defined when modprobing tun
Summary: tun device is not correctly defined when modprobing tun
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
Depends on:
Reported: 2004-04-06 02:53 UTC by Magnus
Modified: 2005-02-11 17:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Magnus 2004-04-06 02:53:17 UTC
I compiled the kernel with TUN support as a module.

when issueing hte following command:
# modprobe tun
it creates a device called tun in /dev/misc/net/ and a link called tun in /dev/net pointing to misc/net/tun.
This is wrong and should be either ../misc/net/tun or /dev/misc/net/tun

Reproducible: Always
Steps to Reproduce:

See detail description.
Actual Results:  

the tundevice is not usable. After correcting it manually:
ln -sf /dev/misc/net/tun /dev/net/tun
it works correctly (used it with openvpn)

Expected Results:  
link correctly the device when probing/inserting the module 

Gentoo Base System version
Portage 2.0.50-r3 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.6.3-gentoo-r1)
System uname: 2.6.3-gentoo-r1 i686 Pentium III (Coppermine)
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
CFLAGS="-O3 -march=pentium3 -pipe -fomit-frame-pointer"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -pipe -fomit-frame-pointer"
FEATURES="autoaddcvs ccache sandbox"
USE="X alsa apm arts avi berkdb bonobo crypt cups dvd encode esd ethereal
foomaticdb gdbm gif gnome gphoto2 gtk gtk2 gtkhtml guile icq imlib jabber jpeg
libg++ libwww mad mikmod motif mpeg ncurses nls oggvorbis opengl oss pam pcmcia
pdflib per perl png python quicktime readline samba sdl slang snd-cs46xx spell
sse ssl svga tcpd truetype usb x86 xml2 xmms xv yahoo zlib"
Comment 1 Greg Kroah-Hartman (RETIRED) gentoo-dev 2004-04-06 07:42:17 UTC
where did you get the specs saying this is where this node should be?

Are you using udev?
Comment 2 Magnus 2004-04-06 10:53:59 UTC
I just noticed that there is already a bug for this related with kernel 2.4.

To know where tun device should be I looked docs of products using it (e.g. openvpn) explaining how to create it...

but my problem is not the localizatio nof the device but the symlink pointing to nowhere.
Comment 3 SpanKY gentoo-dev 2005-02-10 22:04:21 UTC
udev does the correct thing for me:
$ ls -l /dev/net/tun 
crw-rw----  1 root root 10, 200 Feb 10 18:20 /dev/net/tun

user never mentioned whether they use devfs or udev, so please re-open once you have
Comment 4 SpanKY gentoo-dev 2005-02-11 17:05:53 UTC
actually, see Bug 51467

this is fixed in cvs now for devfs