Skip to contentSkip to conversation

New: tun driver fails to open when built in, must be modular

Bugme-new Andrew Morton 3 participants 3 messages Nov 19, 2004 – Nov 20, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Begin forwarded message:

Date: Fri, 19 Nov 2004 14:19:35 -0800
From: [email protected]
To: [email protected]
Subject: [Bugme-new] [Bug 3777] New: tun driver fails to open when built in, must be modular

http://bugme.osdl.org/show_bug.cgi?id=3777

Summary: tun driver fails to open when built in, must be modular
Kernel Version: 2.6.10-rc2
Status: NEW
Severity: normal
Owner: [email protected]
Submitter: [email protected]

Distribution: slackware/mfxlinux
Hardware Environment:i386
Software Environment:
Problem Description: kernel will not assign/open a tun device when tun.o is compiled as a built-in. ifconfig gives 'unable to open /dev/net/tun' error. compiling as a module fixes.

Steps to reproduce:
Compile kernel with tun/tap device driver as a built-in. Run ifconfig to see error. recompile as a module, modprobe tun and run ifconfig - no error.

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

#1 lore raw

Hi.

Quoted 3 lines · Andrew Morton

Problem Description: kernel will not assign/open a tun device when tun.o is compiled as a built-in. ifconfig gives 'unable to open /dev/net/tun' error. compiling as a module fixes.

If anyone can give me a small general hints for what might be the cause of this problem, I could take a look at it. I already have some patches for tun.o (that needs to be sent to the maintainer), another one doesn't hurt :) But since I'm not yet too experienced with programming of kernel modules, any help would be appreciated.

Bye, Mike

#2 lore raw

Re: Fw: [Bugme-new] [Bug 3777] New: tun driver fails to open whenbuilt in, must be modular

Quoted 9 lines

Hi.

Quoted 5 lines · Andrew Morton

Problem Description: kernel will not assign/open a tun device when tun.o is
compiled as a built-in. ifconfig gives 'unable to open /dev/net/tun' error.
compiling as a module fixes.

Quoted 8 lines

If anyone can give me a small general hints for what might be the cause of this problem, I could take a look at it. I already have some patches for tun.o (that needs to be sent to the maintainer), another one doesn't hurt :) But since I'm not yet too experienced with programming of kernel modules, any help would be appreciated.

Bye, Mike

See if it successfully registers with the misc driver (misc_register). I suspect it is an initialization order type thing. Probably the code to register with the misc driver (to create the device) should just be delayed until the network device is brought up (ie dev->open) is called.

Good luck.