Martin Rusko
2002-Nov-21 14:58 UTC
TINC (vpn daemon) has stopped working after compiling kernel
Hi folks, after recompiling of kernel (need quota support), tinc daemon has stopped working. Messages from log file are: ... Nov 21 14:45:02 m61 tinc.sunnet[326]: tincd 1.0pre7 starting Nov 21 14:45:02 m61 tinc.sunnet[326]: /dev/net/tun is a Linux ethertap device Nov 21 14:45:02 m61 tinc.sunnet[326]: Process 327 (tinc-up) exited with non-zero status 255 Nov 21 14:45:02 m61 tinc.sunnet[326]: Ready Nov 21 14:45:02 m61 tinc.sunnet[326]: Error while reading from Linux ethertap device /dev/net/tun: File descriptor in bad state Nov 21 14:45:07 m61 last message repeated 13683 times ... Tinc fails while reading device file /dev/net/tun, but this file seems to be correct (major, minor numbers, permissions): rusko@m61:~$ ls -l /dev/net/tun crw-r--r-- 1 root root 10, 200 Nov 6 22:09 /dev/net/tun I also show here log file records, when tinc is operating normal: ... Nov 18 12:55:32 m61 tinc.sunnet[239]: tincd 1.0pre7 starting Nov 18 12:55:32 m61 tinc.sunnet[239]: /dev/net/tun is a Linux tun/tap device Nov 18 12:55:32 m61 tinc.sunnet[239]: Ready ... My whole journey was: ~~~~~~~~~~~~~~~~~~~~~ Step 1.) distribution kernel (2.4.18 from woody) + tinc/stable 1.0pre7-2 => WORKING Step 2.) custom compiled kernel (2.4.18 from woody's sources) + tinc/stable 1.0pre7-2 => NOT WORKING After some discussion on tinc mailing list I tried recompiling tinc against running custom kernel, with correct kernel headers (--with-kernel=/usr/src/linux and ./configure script has found a correct header file), but: Step 3.) custom compiled kernel (2.4.18 from woody's sources) + tinc/custom_compiled 1.0pre7-2 => NOT WORKING Step 4.) distribution kernel (2.4.18 from woody) + tinc/custom_compiled 1.0pre7-2 => WORKING It seems to be, that I did something wrong, when compiling kernel. But I'm unable to find what. ;-( Also tun.o module from custom kernel has different size, than the one from Woody (but they have the same source). So maybe different compiler, some optimization...I really don't know. Relevant part of .config file is: # # Network device support # CONFIG_NETDEVICES=y # # ARCnet devices # # CONFIG_ARCNET is not set CONFIG_DUMMY=m # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set CONFIG_TUN=m CONFIG_ETHERTAP=m # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y CONFIG_SUNLANCE=y Machine is Sun Ultra1 (sun4u architecture), Debian Woody/Stable, sparc64-linux-gcc --version gives me egcs-2.92.11 Any help, comments, ideas will be very appreciated! Thanks mARTin -- Martin Rusko PhD student Department of Automation and Measurement Faculty of Mechanical Engineering Slovak University of Technology -- E-mail: rusko@sunsite.mine.nu Web: http://sunsite.mine.nu/~rusko -- motto: We are Microsoft! Resistance is futile. Open your source code and prepare for assimilation. Tinc: Discussion list about the tinc VPN daemon Archive: http://mail.nl.linux.org/lists/ Tinc site: http://tinc.nl.linux.org/
Carlos Sousa
2002-Nov-21 15:52 UTC
TINC (vpn daemon) has stopped working after compiling kernel
On Thu, 21 Nov 2002 14:58:51 +0100 Martin Rusko <rusko@sunsite.mine.nu> wrote: (...)> Step 1.) distribution kernel (2.4.18 from woody) + tinc/stable 1.0pre7-2 > => WORKING > > Step 2.) custom compiled kernel (2.4.18 from woody's sources) + > tinc/stable 1.0pre7-2 => NOT WORKING(...) Try doing a "diff -U0 .config-1 .config-2" and see what the differences are between the two kernel configs. HTH. -- Carlos Sousa http://vbc.dyndns.org/ Tinc: Discussion list about the tinc VPN daemon Archive: http://mail.nl.linux.org/lists/ Tinc site: http://tinc.nl.linux.org/
Eric Estabrooks
2002-Nov-22 01:32 UTC
TINC (vpn daemon) has stopped working after compiling kernel
Martin Rusko wrote:> Hi folks, > after recompiling of kernel (need quota support), tinc daemon has > stopped working. Messages from log file are: > ... > Nov 21 14:45:02 m61 tinc.sunnet[326]: tincd 1.0pre7 starting > Nov 21 14:45:02 m61 tinc.sunnet[326]: /dev/net/tun is a Linux ethertap > device > Nov 21 14:45:02 m61 tinc.sunnet[326]: Process 327 (tinc-up) exited > with non-zero status 255 > Nov 21 14:45:02 m61 tinc.sunnet[326]: Ready > Nov 21 14:45:02 m61 tinc.sunnet[326]: Error while reading from Linux > ethertap device /dev/net/tun: File descriptor in bad state > Nov 21 14:45:07 m61 last message repeated 13683 timesI had this exact same problem when working with vtun which uses the tun/tap kernel module. The IOCTL numbers changed between kernel versions, I updated my /usr/include/linux files to match my kernel and recompiled vtun to get rid of the problem. I believe in particular it was IOR or IOWR numbers that changed. It was a while ago so I don't remember the specifics, but it did take me a while to track it down. Eric -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3245 bytes Desc: S/MIME Cryptographic Signature Url : http://brouwer.uvt.nl/pipermail/tinc/attachments/20021121/2b47f38f/smime.bin