Changes between Initial Version and Version 1 of 315-i-get-the-error-cannot-ioctl-tunsetiff-tun0-file-descriptor-in-bad-state-errno77


Ignore:
Timestamp:
01/30/14 16:17:17 (10 years ago)
Author:
Samuli Seppänen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 315-i-get-the-error-cannot-ioctl-tunsetiff-tun0-file-descriptor-in-bad-state-errno77

    v1 v1  
     1= I get the error Cannot ioctl TUNSETIFF tun0: File descriptor in bad state (errno=77)=
     2
     3{{{
     4#!html
     5<pre>&gt;&gt;What was happening<br />&gt;&gt;earlier was that I built openvpn first, then realized I needed to build<br />&gt;&gt;the tun/tap kernel  module, so built that and then rebuilt openvpn - but<br />&gt;&gt;configure (god bless it) used the cached result of NOT finding if_tun.h.<br /> &gt;&gt;  I cleared configure's cache and rebuilt it again - this time it found<br />&gt;&gt;"tun/tap v1.4".  Now I'm onto a new set of problems  though.  Now I get:<br />&gt;&gt;<br />&gt;&gt;34: Cannot ioctl TUNSETIFF tun: File descriptor in bad state (errno=77)<br />&gt;<br />&gt; Though  I've never seen this error personally, it has been talked about<br />&gt; extensively on the vtun list (another tunneling daemon that uses the  TUN/TAP<br />&gt; driver).<br />&gt;<br />&gt; Go to <a href="http://sourceforge.net/mailarchive/forum.php?forum_id=1826"> http://sourceforge.net/mailarchive/forum.php?forum_id=1826</a><br />&gt;<br />&gt; and search for "bad state".<br />&gt;<br />&gt; It appears to be  caused by a mismatch between the tun/tap kernel module and<br />&gt; the kernel itself.<br />&gt;<br />&gt; What kernel version are you  using?<br />&gt;<br />&gt; Because in versions 2.4.6 and higher, the TUN/TAP module is integral to the<br />&gt; kernel -- if you try to build an  external version of the module, rather than<br />&gt; using the one already bundled, it will likely fail.<br /><br />Also I've read a few posts  that suggest that /usr/src/linux needs to point<br />to headers that match the running kernel.  Depending on what Sean has, it<br />may be  worthwhile to ensure all the various versions<br />(kernel/headers/tunTap) all match.</pre>
     6}}}
     7
     8[wiki:FAQ Return to FAQ]